chore: CI worfklows for linting docs #1289
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| docs: | |
| name: Check docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| - run: uv sync --group docs | |
| # Fast source-level guards that need no built site, so they run before the (slower) | |
| # build for a quick failure: every public export is in the API reference, and no | |
| # docstring/Markdown carries reStructuredText markup that MkDocs won't render. | |
| - run: uv run python ci/check_documented_exports.py docs/api | |
| - run: uv run python ci/lint_docs.py | |
| # --strict turns warnings into errors, so a docs code block that fails to execute | |
| # at build time (e.g. a non-exec python fence disrupting a later exec="true" block) | |
| # fails CI instead of merging as a silent warning. | |
| - run: uv run mkdocs build --strict | |
| env: | |
| DISABLE_MKDOCS_2_WARNING: "true" | |
| NO_MKDOCS_2_WARNING: "true" | |
| - run: uv run python ci/check_unlinked_types.py | |
| continue-on-error: true |