A5: port the a2a3 AICore retirement protocol #3353
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: | |
| # Republish without a code change, and exercise the deploy path on demand. | |
| workflow_dispatch: | |
| # Allow one deploy at a time; skip superseded runs rather than queueing them. | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read shared theme revision | |
| id: theme | |
| shell: bash | |
| run: | | |
| theme_revision=$(cat docs/theme-revision.txt) | |
| if [[ ! "$theme_revision" =~ ^[0-9a-f]{40}$ ]]; then | |
| echo "::error::docs/theme-revision.txt must contain a full Git commit SHA" | |
| exit 1 | |
| fi | |
| printf 'revision=%s\n' "$theme_revision" >> "$GITHUB_OUTPUT" | |
| - name: Checkout shared documentation theme | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: hw-native-sys/hw-native-sys.github.io | |
| ref: ${{ steps.theme.outputs.revision }} | |
| path: .site-theme | |
| persist-credentials: false | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: pip | |
| cache-dependency-path: | | |
| docs/requirements.txt | |
| .site-theme/docs-theme/constraints.txt | |
| # Deliberately not `pip install .`: that runs scikit-build-core and builds | |
| # the C++ runtime. mkdocstrings reads `python/simpler` through griffe, which | |
| # parses statically, so the docs need neither a CANN toolkit nor the built | |
| # nanobind extension — only the three tools below. | |
| - name: Install docs toolchain | |
| run: pip install -r docs/requirements.txt | |
| - name: Build site | |
| env: | |
| DOCS_REF: ${{ github.event_name == 'push' && 'main' || github.sha }} | |
| # --strict fails on a dead intra-docs link, a page missing from nav, or | |
| # a bad anchor. No warning class is exempt. | |
| run: mkdocs build --strict --site-dir _site | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| # Only main publishes; a pull request builds to prove the docs still compile. | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - id: deploy | |
| uses: actions/deploy-pages@v4 |