Skip to content

Fix Pages deploy: rename workflow, tighten permissions#9

Merged
oschwald merged 1 commit into
mainfrom
kphair/stf-264-pages-workflow-fix
May 22, 2026
Merged

Fix Pages deploy: rename workflow, tighten permissions#9
oschwald merged 1 commit into
mainfrom
kphair/stf-264-pages-workflow-fix

Conversation

@klp2
Copy link
Copy Markdown
Contributor

@klp2 klp2 commented May 22, 2026

Summary

  • Rename .github/workflows/ghpages.ymlpages.yml to match the libmaxminddb / mod_maxminddb / geoipupdate convention (Greg's STF-448 migration).
  • Drop enablement: true from actions/configure-pages — the root cause of every recent main-push failure with Resource not accessible by integration. The Pages site is already enabled, so configure-pages will GET it cleanly without trying to POST.
  • Tighten permissions: remove the unused pages: write from the build job (deploy already has it, along with id-token: write). Build job now has contents: read only.
  • Retain PR-build trigger + path-ignored filters so dependabot bumps continue to validate the draft compiles.

Validation

  • Workflow on main should now reach the deploy job and complete.
  • gh api repos/maxmind/ipfeed-draft/pages should report status: "built" (currently null).
  • https://maxmind.github.io/ipfeed-draft/ should serve the built draft.

For STF-264.

🤖 Generated with Claude Code

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Rename .github/workflows/ghpages.yml to pages.yml to match the
libmaxminddb/mod_maxminddb/geoipupdate convention (Greg's STF-448
migration). Tighten permissions to least-privilege per job: drop the
unused pages:write from the build job (deploy already has it, along
with the id-token:write needed for OIDC). Build job now has
contents:read only. Drop the enablement:true flag from configure-pages
which was causing every main push to fail at "Resource not accessible
by integration" — the GITHUB_TOKEN lacks repo-admin scope to create
the Pages site, but the site is now already enabled so the flag is no
longer needed. Restrict the push trigger to branches: ["main"] so
feature-branch pushes don't fire the workflow with a deploy job that
gets rightly rejected by the github-pages environment's branch
protection.

PR-build trigger and path-ignored filters are retained so dependabot
bumps continue to validate the draft compiles before merging to main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@klp2 klp2 force-pushed the kphair/stf-264-pages-workflow-fix branch from 82f8f8b to 30801e5 Compare May 22, 2026 17:57
@klp2 klp2 requested a review from oschwald May 22, 2026 20:07
@oschwald oschwald merged commit 6a2dd4f into main May 22, 2026
5 checks passed
@oschwald oschwald deleted the kphair/stf-264-pages-workflow-fix branch May 22, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants