diff --git a/.github/PAGES.md b/.github/PAGES.md index 3d4bde5..d3d2e95 100644 --- a/.github/PAGES.md +++ b/.github/PAGES.md @@ -25,8 +25,9 @@ on Linux, Windows, and macOS before deployment. Deployment runs only for a push to `main` in `LukasNiessen/ArchUnitZig`. The deploy job downloads the already-validated ordinary artifact, configures Pages, packages the Pages artifact, and deploys it -with job-scoped `pages: write` and `id-token: write` permissions. Configure the repository's Pages -source as **GitHub Actions** before the first upstream deployment. +with job-scoped `pages: write` and `id-token: write` permissions. On its first canonical run, +`actions/configure-pages` enables the repository's **GitHub Actions** Pages source; forks and pull +requests never reach that step. ## Editing diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce8861f..9659fb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,6 +129,8 @@ jobs: - name: Configure Pages uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + with: + enablement: true - name: Package Pages artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 diff --git a/docs/decisions.md b/docs/decisions.md index dc7d782..537e7c2 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -1197,7 +1197,8 @@ manifest, verification, and extraction boundary without network access. All external GitHub Actions references use immutable commit SHAs with the reviewed stable release tag beside them. The workflow grants only `contents: read` globally. Pages write and OIDC permissions exist only on the canonical main-push deploy job, which depends on every compatibility and quality -gate. Fork pull requests can build and upload the ordinary documentation artifact but cannot deploy. +gate. That guarded job may enable the GitHub Actions Pages source on its first run; fork pull requests +can build and upload the ordinary documentation artifact but cannot configure or deploy Pages. No dependency or build cache is configured; a future cache must include the Zig version plus relevant ZON hash or lock inputs in its key. diff --git a/scripts/check_ci.py b/scripts/check_ci.py index dd155f9..5480f2a 100644 --- a/scripts/check_ci.py +++ b/scripts/check_ci.py @@ -43,6 +43,7 @@ def main() -> None: "zig build docs -Doptimize=ReleaseSafe", "pages: write", "id-token: write", + "enablement: true", "needs:", "- compatibility", "- quality",