From 67a27d70ef06df15b7ff662dbdeb54cd8eb931e2 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 26 May 2026 17:01:27 +0100 Subject: [PATCH] fix(ci): self-provision GitHub Pages so casket-pages.yml stops failing on main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every push to main has been failing with: ##[error]Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action. Error: Not Found - https://docs.github.com/rest/pages/pages Root cause: GitHub Pages was never enabled for the repo at the GitHub level. `gh api repos/hyperpolymath/affinescript/pages` returns 404. The casket-pages.yml workflow has been hitting the Setup Pages step (actions/configure-pages) without `enablement: true` and failing the build job on every main push since the workflow was added. This poisons the baseline: every rebase from main pulls in a known-red state. Audited 2026-05-26 while diagnosing affinescript PR #359's inherited failure — PR #359 was a pure file-move and ALSO failed CI; proves the failure source is upstream of any PR's changes. Fix: add `enablement: true` to the configure-pages step. The action's own permissions (pages: write, id-token: write, already granted in the workflow) authorise the enablement call; this is idempotent across subsequent runs. Cross-references: - session_2026_05_26_three_repo_ci_remediation.md (this thread) - affinescript inherited-baseline notes in STATE.a2ml session-note-2026-05-26 Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/casket-pages.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/casket-pages.yml b/.github/workflows/casket-pages.yml index 71c6334a..64c6da3e 100644 --- a/.github/workflows/casket-pages.yml +++ b/.github/workflows/casket-pages.yml @@ -80,6 +80,15 @@ jobs: - name: Setup Pages uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + with: + # Self-provision Pages on first run instead of failing with + # 404 ("Get Pages site failed"). The repo had Pages disabled + # at the GitHub level since the workflow was added; rather + # than maintain that as out-of-band state, let the workflow + # enable it. Idempotent on subsequent runs. The workflow's + # own permissions (pages: write, id-token: write) authorise + # this. + enablement: true - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0