-
-
Notifications
You must be signed in to change notification settings - Fork 80
50 lines (47 loc) · 1.2 KB
/
book.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
pull_request:
workflow_dispatch:
name: Book
permissions:
contents: read
pages: write
id-token: write
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rust-src
- name: Install mdbook I
uses: taiki-e/install-action@v2
with:
tool: cargo-binstall,mdbook
- name: Install mdbook II
run: |
cargo binstall -y mdbook-cmdrun
cargo binstall -y trunk@0.17.5
rustup target add wasm32-unknown-unknown
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build mdbook
run: |
cd docs/book
mdbook build
python3 post_build.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/book/book
- name: Deploy book to github pages
id: deployment
if: github.event_name != 'pull_request'
uses: actions/deploy-pages@v2