# Action pins: each third-party action is pinned to a full commit SHA. Resolved 2026-10-20 with # gh api repos///git/ref/tags/ (each ref is type "commit"; no tag-object dereference needed) # actions/configure-pages tag v5 -> 983d7736d9b0ae728b81ab479565c72886d7745b # Pages upload step (artifact action, tag v4) -> 7b1f4a764d45c48632c6b24a0339c27f5614fb0b # actions/deploy-pages tag v4 -> d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e name: GitHub Pages (community site) on: pull_request: paths: - 'site/**' - 'tools/check_pages.py' - 'docs/pages.md' - '.github/workflows/pages.yml' push: branches: [main] paths: - 'site/**' - 'tools/check_pages.py' - 'docs/pages.md' - '.github/workflows/pages.yml' workflow_dispatch: permissions: contents: read concurrency: group: pages-${{ github.ref }} cancel-in-progress: false # Privilege split: validate and build hold contents: read only. Only deploy holds pages: write and id-token: write, # and it runs no checkout, no run: and no env:; it deploys the artifact that build uploaded in this same run. jobs: validate: runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: contents: read steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - name: Validate pages run: python3 tools/check_pages.py build: # A guard job: it runs no build code. It stages site/ and verifies the staged files before the Pages upload, using the # trusted main copy of the guard. The guard layout requires the stage and verify steps immediately before the upload # in the same job, so they live here rather than in validate. needs: validate runs-on: ubuntu-24.04 timeout-minutes: 10 permissions: contents: read steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - name: Trusted guard (main) uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: ref: main path: .trusted-main sparse-checkout: tools/artifact_guard.py sparse-checkout-cone-mode: false persist-credentials: false - name: Resolve python3 (trusted) id: pyresolve run: | echo "python=$(command -v python3)" >> "$GITHUB_OUTPUT" - name: Guard placement (trusted) run: | "${{ steps.pyresolve.outputs.python }}" ".trusted-main/tools/artifact_guard.py" --root "$GITHUB_WORKSPACE" --check-placement - name: Configure Pages uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 - name: Stage Pages artifact (trusted guard) run: | "${{ steps.pyresolve.outputs.python }}" ".trusted-main/tools/artifact_guard.py" --root "$GITHUB_WORKSPACE" --stage .github/workflows/pages.yml "Upload Pages artifact" - name: Verify Pages artifact (trusted guard) run: | "${{ steps.pyresolve.outputs.python }}" ".trusted-main/tools/artifact_guard.py" --root "$GITHUB_WORKSPACE" --verify .github/workflows/pages.yml "Upload Pages artifact" - name: Upload Pages artifact uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4 with: path: .artifact-stage/site deploy: needs: build if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-24.04 timeout-minutes: 10 permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy from main id: deployment uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4