feat(docs/index.md):在贡献者头像下方添加「提交次数」 #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish site | |
on: # 在什么时候触发工作流 | |
push: # 在从本地 main 分支被 push 到 GitHub 仓库时 | |
branches: | |
- main | |
pull_request: # 在 main 分支合并别人提的 PR 时 | |
branches: | |
- main | |
jobs: # 工作流的具体内容 | |
deploy: | |
runs-on: ubuntu-latest # 创建一个新的云端虚拟机,使用最新 Ubuntu 系统 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # 拉取完整的 Git 历史记录 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install mkdocs-material | |
pip install mkdocs-git-revision-date-localized-plugin | |
pip install mkdocs-git-committers-plugin-2 # 安装相关插件 | |
- name: Deploy to GitHub Pages | |
env: | |
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }} | |
run: mkdocs gh-deploy --force # 部署文档到 GitHub Pages |