taskwarrior/.github/workflows/publish-docs.yml
Dustin J. Mitchell 31ff46bee6 pin mdbook version
2021-06-09 15:38:36 -04:00

47 lines
1.2 KiB
YAML

name: Docs
on:
push:
branches:
- main
jobs:
mdbook-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
# if this changes, change it in cli/Cargo.toml and .github/workflows/publish-docs.yml as well
mdbook-version: '0.4.10'
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Create usage-docs plugin
run: cargo build -p taskchampion-cli --features usage-docs --bin usage-docs
- run: mdbook build docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book