Skip to content

Commit b5c87a7

Browse files
committed
notes
1 parent 040b8b9 commit b5c87a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/mkdocs-deploy.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
name: Deploy MkDocs
1+
name: Deploy MkDocs to GitHub Pages
22
on:
33
push:
44
branches:
5-
- main # 设置触发部署的分支
5+
- main
66
pull_request:
77
branches:
88
- main
99

10-
1110
jobs:
1211
deploy:
1312
runs-on: ubuntu-latest
14-
permissions:
15-
contents: write
1613
steps:
1714
- uses: actions/checkout@v3
1815
- uses: actions/setup-python@v4
@@ -25,8 +22,11 @@ jobs:
2522
pip install mkdocs-statistics-plugin
2623
pip install mkdocs-heti-plugin
2724
pip install mkdocs-include-dir-to-nav
28-
- name: Deploy
29-
run: |
30-
git config --global user.name "GitHub Actions"
31-
git config --global user.email "[email protected]"
32-
mkdocs gh-deploy --force
25+
- name: Build site
26+
run: mkdocs build
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
if: github.ref == 'refs/heads/main'
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./site

0 commit comments

Comments
 (0)