File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy MkDocs
1
+ name : Deploy MkDocs to GitHub Pages
2
2
on :
3
3
push :
4
4
branches :
5
- - main # 设置触发部署的分支
5
+ - main
6
6
pull_request :
7
7
branches :
8
8
- main
9
9
10
-
11
10
jobs :
12
11
deploy :
13
12
runs-on : ubuntu-latest
14
- permissions :
15
- contents : write
16
13
steps :
17
14
- uses : actions/checkout@v3
18
15
- uses : actions/setup-python@v4
25
22
pip install mkdocs-statistics-plugin
26
23
pip install mkdocs-heti-plugin
27
24
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
You can’t perform that action at this time.
0 commit comments