File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - main
77
88jobs :
9- deploy :
10- runs-on : ubuntu-20.04
11- concurrency :
12- group : ${{ github.workflow }}-${{ github.ref }}
9+ build :
10+ runs-on : ubuntu-latest
11+
1312 steps :
14- # checkout v2, with recursive submodule update
1513 - name : Checkout 🛎️
16- uses : actions/checkout@v2
17- with :
18- submodules : recursive
14+ uses : actions/checkout@v4
15+
16+ - name : Install mdBook 📚
17+ run : |
18+ wget https://github.com/rust-lang/mdBook/releases/download/v0.4.52/mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz
19+ tar -xzf mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz
20+ sudo mv mdbook /usr/local/bin/
1921
2022 - name : Build 🔨
2123 run : |
22- DOCKER_USER="$(id -u):$(id -g)" MDBOOK_JUST_BUILD=1 docker-compose run mdbook
24+ ./wrapper.sh build
2325
24- - name : Deploy 🚀
25- uses : peaceiris/actions-gh-pages@v3
26- if : ${{ github.ref == 'refs/heads/main' }}
26+ - name : Upload static files as artifact
27+ id : deployment
28+ uses : actions/upload-pages-artifact@v3
2729 with :
28- github_token : ${{ secrets.GITHUB_TOKEN }}
29- publish_dir : ./book
30+ path : book/
31+
32+ deploy :
33+ # Add a dependency to the build job
34+ needs : build
35+
36+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+ permissions :
38+ pages : write # to deploy to Pages
39+ id-token : write # to verify the deployment originates from an appropriate source
40+
41+ # Deploy to the github-pages environment
42+ environment :
43+ name : github-pages
44+ url : ${{ steps.deployment.outputs.page_url }}
45+
46+ # Specify runner + deployment step
47+ runs-on : ubuntu-latest
48+ steps :
49+ - name : Deploy to GitHub Pages
50+ id : deployment
51+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 66 - main
77
88jobs :
9- deploy :
10- runs-on : ubuntu-20.04
11- concurrency :
12- group : ${{ github.workflow }}-${{ github.ref }}
9+ build :
10+ runs-on : ubuntu-latest
11+
1312 steps :
14- # checkout v2, with recursive submodule update
1513 - name : Checkout 🛎️
16- uses : actions/checkout@v2
17- with :
18- submodules : recursive
14+ uses : actions/checkout@v4
15+
16+ - name : Install mdBook 📚
17+ run : |
18+ wget https://github.com/rust-lang/mdBook/releases/download/v0.4.52/mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz
19+ tar -xzf mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz
20+ sudo mv mdbook /usr/local/bin/
1921
2022 - name : Build 🔨
2123 run : |
22- DOCKER_USER="$(id -u):$(id -g)" MDBOOK_JUST_BUILD=1 docker-compose run mdbook
24+ ./wrapper.sh build
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ set -ex
1111
1212python3 generate-summary.py
1313
14- if [ -n " ${MDBOOK_JUST_BUILD} " ]; then
14+ # if arg is "build", just build the book
15+ if [ " $1 " = " build" ]; then
1516 mdbook build
1617else
1718 mdbook serve --hostname ' 0.0.0.0'
You can’t perform that action at this time.
0 commit comments