finish Chapter 4 draft #24
This file contains hidden or 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 mdBook | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- "*doc" | |
jobs: | |
deploy-book: | |
runs-on: ubuntu-latest | |
container: | |
image: rust:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Avoid building the entire Rust toolchain, use Rust image instead. | |
# - name: Setup Rust toolchain | |
# uses: actions-rs/toolchain@v1 | |
# with: | |
# toolchain: stable | |
- name: Install mdBook and preprocessors | |
run: | | |
cargo install mdbook mdbook-katex | |
- name: Build mdBook | |
run: mdbook build documentation/mdbook | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
# if: github.ref == 'refs/heads/main' # reinstate when dev is complete | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./documentation/mdbook/book | |
destination_dir: book | |
keep_files: true |