update book generation #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Book | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "docs/book/**" | |
jobs: | |
deploy: | |
name: "Deploy to Pages" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Setup Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
toolchain: stable | |
- name: Cache cargo & target directories | |
uses: Swatinem/rust-cache@v2 | |
- name: "Checkout Code" | |
uses: actions/checkout@v2 | |
- name: "Install mdbook" | |
run: cargo install mdbook mdbook-mermaid | |
working-directory: docs/book | |
- name: "Build Static Content" | |
run: mdbook build | |
working-directory: docs/book | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/book/book |