File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-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 : Build book
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 : Upload artifact
34+ uses : actions/upload-pages-artifact@v3
35+ with :
36+ path : ./book
37+
38+ deploy-pages :
39+ environment :
40+ name : github-pages
41+ url : ${{ steps.deployment.outputs.page_url }}
42+ runs-on : ubuntu-latest
43+ needs : build-docs
44+ steps :
45+ - name : Deploy to GitHub Pages
46+ id : deployment
47+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments