File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : [ "main" ]
66
77jobs :
8- deploy :
8+ build :
99 runs-on : ubuntu-latest
10- permissions :
11- contents : write
12- pull-requests : write
1310 steps :
1411 - uses : actions/checkout@v6
1512 with :
@@ -26,14 +23,22 @@ jobs:
2623 - name : Deploy GitHub Pages
2724 run : |
2825 mdbook build
29- git worktree add gh-pages
30- git config user.name "Deploy from CI"
31- git config user.email ""
26+ mkdir gh-pages
3227 cd gh-pages
33- # Delete the ref to avoid keeping history.
34- git update-ref -d refs/heads/gh-pages
35- rm -rf *
3628 mv ../book/* .
37- git add .
38- git commit -m "Deploy $GITHUB_SHA to gh-pages"
39- git push --force --set-upstream origin gh-pages
29+ - name : Upload static files as artifact
30+ id : deployment
31+ uses : actions/upload-pages-artifact@v5
32+ with :
33+ path : gh-pages/
34+ deploy :
35+ needs : build
36+ runs-on : ubuntu-latest
37+ permissions :
38+ pages : write
39+ environment :
40+ name : github-pages
41+ url : ${{ steps.deployment.outputs.page_url }}
42+ steps :
43+ - id : deployment
44+ uses : actions/deploy-pages@v5
You can’t perform that action at this time.
0 commit comments