name: doc
on:
push:
branches:
pull_request:
branches:
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: doc-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Fail the build on any rustdoc warning (e.g. broken intra-doc links).
RUSTDOCFLAGS: -D warnings
jobs:
doc:
name: cargo doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Build documentation
run: cargo doc --all-features --no-deps