name: Rustdoc
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build
- name: Run tests
run: cargo test --all-features
- name: Generate docs
run: RUSTDOCFLAGS="--html-in-header ./docs-header.html" cargo doc --all-features --no-deps
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc/