| # Licensed under the Apache-2.0 license |
| |
| name: Documentation |
| |
| on: |
| push: |
| branches: [ main ] |
| pull_request: |
| branches: [ main ] |
| |
| permissions: |
| contents: read |
| |
| env: |
| CARGO_TERM_COLOR: always |
| |
| jobs: |
| docs: |
| name: Documentation |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v5 |
| |
| - name: Install Rust toolchain |
| uses: dtolnay/rust-toolchain@stable |
| with: |
| components: rust-docs |
| |
| - name: Cache cargo registry |
| uses: actions/cache@v4 |
| with: |
| path: | |
| ~/.cargo/registry |
| ~/.cargo/git |
| target |
| key: ${{ runner.os }}-docs-cargo-${{ hashFiles('**/Cargo.lock') }} |
| |
| - name: Build documentation |
| run: cargo doc --all-features --no-deps --workspace |
| |
| - name: Check for broken links in docs |
| run: | |
| cargo install cargo-deadlinks |
| cargo deadlinks --check-http |
| continue-on-error: true |