Merge pull request #118 from eitsupi/eitsupi-patch-1 #11
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: docs | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
~/.cargo/bin | |
cargo_target | |
# We reuse the cache from our detailed test environment, if available | |
key: detailed-test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install mdbook | |
run: ./scripts/install-mdbook | |
- name: Install mdbook extras | |
run: ./book/scripts/install-mdbook-extras | |
- name: Build book | |
run: ./scripts/build-book | |
- name: Push docs | |
uses: JamesIves/github-pages-deploy-action@v4.4.1 | |
with: | |
branch: gh-pages | |
folder: book/book |