|
|
|
@ -2,8 +2,7 @@ name: Build and deploy documentation book |
|
|
|
|
|
|
|
|
|
on: |
|
|
|
|
push: |
|
|
|
|
branches: |
|
|
|
|
- master |
|
|
|
|
pull_request: |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
book: |
|
|
|
@ -16,10 +15,23 @@ jobs: |
|
|
|
|
toolchain: stable |
|
|
|
|
override: true |
|
|
|
|
|
|
|
|
|
- name: Cache dependencies |
|
|
|
|
uses: actions/cache@v2 |
|
|
|
|
env: |
|
|
|
|
cache-name: cache-mdbook |
|
|
|
|
with: |
|
|
|
|
path: | |
|
|
|
|
~/.cargo/.crates.toml |
|
|
|
|
~/.cargo/.crates2.json |
|
|
|
|
~/.cargo/bin |
|
|
|
|
~/.cargo/registry/index |
|
|
|
|
~/.cargo/registry/cache |
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-0.3 }} |
|
|
|
|
|
|
|
|
|
- name: Install mdbook |
|
|
|
|
run: | |
|
|
|
|
(test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) |
|
|
|
|
(test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.2" mdbook) |
|
|
|
|
(test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook) |
|
|
|
|
cargo install-update -a |
|
|
|
|
|
|
|
|
|
- name: Build book |
|
|
|
@ -31,6 +43,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
- name: Deploy book |
|
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.4 |
|
|
|
|
if: ${{ github.ref == 'refs/heads/master' }} |
|
|
|
|
with: |
|
|
|
|
branch: gh-pages |
|
|
|
|
folder: docs |
|
|
|
|