Deploy book from releases, not commits to main #28
Workflow file for this run
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: Build book | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/book.yml | |
- book/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: beta | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install mdbook and mdbook-linkcheck | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: mdbook, mdbook-linkcheck | |
- name: Build mdbook | |
run: | | |
mdbook build book | |
- name: Archive book output | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: book | |
path: book/book |