fix(exporters): preserve history and contain batch failures #86
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: Deploy Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| python-version: "3.12" | |
| - run: uv sync --locked --extra docs | |
| - run: uv run --extra docs mkdocs build --strict | |
| env: | |
| # mkdocs-material prints an advisory about upstream MkDocs 2.0 on every | |
| # build. It is not a defect here: pyproject pins mkdocs<2, so the | |
| # incompatibility it warns about cannot arise. NO_MKDOCS_2_WARNING is | |
| # the vendor's own documented off-switch (material/plugins/__init__.py). | |
| # justfile already sets this; CI must match or the two gates disagree. | |
| NO_MKDOCS_2_WARNING: "1" | |
| deploy: | |
| # Publishes the built site straight from a workflow artifact. This used to | |
| # run `mkdocs gh-deploy --force`, which pushed the rendered HTML to a | |
| # gh-pages branch -- and since Pages was never enabled on the repository | |
| # (has_pages: false, and the site_url returned 404), that branch was | |
| # write-only: CI regenerated it on every docs push and nothing served it. | |
| # Deploying from an artifact keeps the source in main, keeps build output | |
| # out of git entirely, and removes the branch from the picture. | |
| if: github.event_name == 'push' | |
| needs: build | |
| permissions: | |
| pages: write # deploy to the Pages environment | |
| id-token: write # OIDC token the deploy action verifies with | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| python-version: "3.12" | |
| - run: uv sync --locked --extra docs | |
| - run: uv run --extra docs mkdocs build --strict | |
| env: | |
| NO_MKDOCS_2_WARNING: "1" | |
| - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: site | |
| - id: deployment | |
| uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 |