File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy docs
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : pages
15+ cancel-in-progress : false
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Install mdbook
23+ run : |
24+ tag=$(curl -s https://api.github.com/repos/rust-lang/mdbook/releases/latest | jq -r '.tag_name')
25+ url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
26+ mkdir mdbook && curl -sSL "$url" | tar -xz --directory=./mdbook
27+ echo "$PWD/mdbook" >> "$GITHUB_PATH"
28+ - name : Build book
29+ run : cd docs && mdbook build
30+ - name : Upload artifact
31+ uses : actions/upload-pages-artifact@v3
32+ with :
33+ path : docs/book
34+
35+ deploy :
36+ needs : build
37+ runs-on : ubuntu-latest
38+ environment :
39+ name : github-pages
40+ url : ${{ steps.deployment.outputs.page_url }}
41+ steps :
42+ - name : Deploy to GitHub Pages
43+ id : deployment
44+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments