File tree Expand file tree Collapse file tree 1 file changed +37
-25
lines changed Expand file tree Collapse file tree 1 file changed +37
-25
lines changed Original file line number Diff line number Diff line change 1- name : github pages
1+ name : Deploy mdBook site to Pages
22
33on :
4- push :
5- branches :
6- - master
7- pull_request :
8- workflow_dispatch :
4+ push :
5+ branches : [main]
6+ workflow_dispatch : # Allows you to run this workflow manually from the Actions tab
97
10- jobs :
11- deploy :
12- runs-on : ubuntu-20.04
13- concurrency :
14- group : ${{ github.workflow }}-${{ github.ref }}
15- steps :
16- - uses : actions/checkout@v2
8+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
1713
18- - name : Setup mdBook
19- uses : peaceiris/actions-mdbook@v1
20- with :
21- mdbook-version : " 0.4.37 "
22- # mdbook-version: 'latest'
14+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+ concurrency :
17+ group : pages
18+ cancel-in-progress : false
2319
24- - run : mdbook build
20+ jobs :
21+ build :
22+ runs-on : ubuntu-24.04
23+ steps :
24+ - uses : actions/checkout@v4
25+ - uses : peaceiris/actions-mdbook@v2
26+ with :
27+ mdbook-version : latest
28+ - id : pages
29+ uses : actions/configure-pages@v5
30+ - run : mdbook build
31+ - uses : actions/upload-pages-artifact@v3
32+ with :
33+ path : ./book
2534
26- - name : Deploy
27- uses : peaceiris/actions-gh-pages@v3
28- if : ${{ github.ref == 'refs/heads/master' }}
29- with :
30- github_token : ${{ secrets.GITHUB_TOKEN }}
31- publish_dir : ./book
35+ deploy :
36+ environment :
37+ name : github-pages
38+ url : ${{ steps.deployment.outputs.page_url }}
39+ runs-on : ubuntu-24.04
40+ needs : build
41+ steps :
42+ - id : deployment
43+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments