Switch GitHub Pages deployment to gh-pages branch source#6
Open
klp2 wants to merge 1 commit into
Open
Conversation
Replace the workflow-source deploy (configure-pages, upload-pages-artifact, deploy-pages) with a single peaceiris/actions-gh-pages step that pushes the built artifacts to a gh-pages branch. This pairs with a terraform change that switches pages.build_type = "workflow" to pages.source.branch = "gh-pages": the workflow source path was silently no-opping in terraform-provider-github on this org-owned, never-bootstrapped repo, so no Pages site was ever created and every workflow run failed at configure-pages with "Resource not accessible by integration". - Drop the deploy job, id-token: write, and the github-pages environment - Build job perms: contents: read + pages: write -> contents: write - Add branches-ignore: [gh-pages] to both push and pull_request triggers to avoid the publish-loop - Add touch _site/.nojekyll so Jekyll stays off after each deploy Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
configure-pages/upload-pages-artifact/deploy-pages) withpeaceiris/actions-gh-pages@v4.1.0pushing built artifacts to agh-pagesbranch.mm_website(pages.build_type = "workflow"→pages.source = { branch = "gh-pages" }). The workflow-source path was silently no-opping interraform-provider-githubon this org-owned, never-bootstrapped repo, which is why no Pages site has ever existed foripfeed-draftand every workflow run was failing atconfigure-pageswithResource not accessible by integration.branches-ignore: [gh-pages](so peaceiris's push doesn't re-trigger us), narrow build-job perms tocontents: write, dropid-token: writealong with the deploy job andgithub-pagesenvironment.touch _site/.nojekyllso Jekyll processing stays off across deploys (peaceiris replaces branch contents on each run; embedding.nojekyllin_site/makes it durable).Sequencing for the rollout
gh-pagesbranch already pushed (cd47753) so the terraform apply on the companionmm_websitebranch will succeed instead of erroring withbranch does not exist.main, the next push runs the workflow → drafts build → peaceiris replacesgh-pagescontent with_site/.https://maxmind.github.io/ipfeed-draft/should serve the index page and link to the built draft HTML/TXT within ~30s of the deploy step finishing.Test plan
github.event_name == 'push', so it stays skipped).mainshows a successfulPublish to gh-pagesstep.gh-pagesbranch on the remote receives a new commit fromgithub-actions[bot]containing_site/.https://maxmind.github.io/ipfeed-draft/returns 200 with the index page and working draft links.🤖 Generated with Claude Code