Repository navigation
refactor!: remove unapproved compatibility APIs #75
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: docs-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: "3.12" | |
| UV_VERSION: "0.10.9" | |
| UV_NO_MANAGED_PYTHON: "1" | |
| NO_MKDOCS_2_WARNING: "1" | |
| jobs: | |
| build: | |
| name: Strict Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| enable-cache: true | |
| - name: Install locked documentation environment | |
| run: uv sync --locked --dev --extra docs | |
| - name: Record source identity | |
| run: | | |
| echo "ML4T_DOCS_VERSION=$(uv run python -c 'from ml4t.data import __version__; print(__version__)')" >> "$GITHUB_ENV" | |
| echo "ML4T_DOCS_COMMIT=${GITHUB_SHA}" >> "$GITHUB_ENV" | |
| - name: Build documentation strictly | |
| run: uv run mkdocs build --strict | |
| - name: Verify rendered identity | |
| run: >- | |
| uv run python scripts/verify_documentation_identity.py | |
| --site site | |
| --expected-library data | |
| --expected-version "$ML4T_DOCS_VERSION" | |
| --expected-commit "$ML4T_DOCS_COMMIT" | |
| - name: Upload rendered documentation | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: docs-site-${{ github.sha }} | |
| path: site/ | |
| if-no-files-found: error |