name: Docs # Builds the documentation of every workspace crate with warnings as errors, so a public item # without a doc comment or a broken doc link fails, including crates no other workflow covers. on: workflow_dispatch: push: branches: [main, next] paths: ['crates/**', 'Cargo.toml', 'Cargo.lock', '.github/workflows/docs.yml'] pull_request: paths: ['crates/**', 'Cargo.toml', 'Cargo.lock', '.github/workflows/docs.yml'] permissions: contents: read jobs: docs: timeout-minutes: 30 name: Workspace docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 with: # The token isn't needed after checkout; cargo runs build scripts and proc macros from # dependencies, so don't leave it in .git/config for that third-party code to read. persist-credentials: false - uses: step-security/dtolnay-rust-toolchain@v1.0.0 with: toolchain: stable - uses: step-security/rust-cache@v2.9.2 - name: Docs (links and missing docs) run: cargo doc --workspace --no-deps --locked --keep-going env: RUSTDOCFLAGS: -D warnings