automerge/.github/workflows/docs.yaml
2022-04-23 11:44:12 +01:00

44 lines
980 B
YAML

on:
push:
branches:
- main
name: Documentation
jobs:
deploy-docs:
concurrency: deploy-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Clean docs dir
uses: actions-rs/cargo@v1
with:
command: clean
args: --doc
- name: Build docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --all-features --no-deps
- name: Configure root page
run: echo '<meta http-equiv="refresh" content="0; url=automerge">' > target/doc/index.html
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc