File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Rust docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : main
6+ workflow_dispatch :
7+
8+ env :
9+ MDBOOK_VERSION : " 0.4.52"
10+ CARGO_TERM_COLOR : always
11+
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : false
20+
21+ jobs :
22+ build-docs :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v5
26+ - name : Setup Rust
27+ run : rustup update stable --no-self-update && rustup default stable
28+ - name : Download mdBook ${{ env.MDBOOK_VERSION }}
29+ run : |
30+ mkdir -p /tmp/mdbook
31+ curl -Lo- https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -C /tmp/mdbook -xzv
32+ /tmp/mdbook/mdbook build
33+ - name : Setup Pages
34+ id : pages
35+ uses : actions/configure-pages@v5
36+ - name : Generate docs
37+ run : mdbook build
38+ - name : Upload artifact
39+ uses : actions/upload-pages-artifact@v3
40+ with :
41+ path : ./book
42+
43+ deploy-pages :
44+ environment :
45+ name : github-pages
46+ url : ${{ steps.deployment.outputs.page_url }}
47+ runs-on : ubuntu-latest
48+ needs : build-docs
49+ steps :
50+ - name : Deploy to GitHub Pages
51+ id : deployment
52+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments