fix: ensure GitHub Pages build_type is reset to workflow on every deploy run - #2
Merged
Merged
Conversation
Replace actions/configure-pages@v6 with a direct GitHub API call that uses PUT to update an existing Pages site's build_type to 'workflow', falling back to POST to create the site if it does not exist. The previous configure-pages action would silently accept an existing Pages site regardless of its build_type, meaning a site misconfigured for branch-based deployment would cause deploy-pages to fail with 'Deployment failed, try again later.' Also add administration:write permission so the GITHUB_TOKEN can update repository Pages settings.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job deploy
fix: ensure GitHub Pages build_type is reset to Jul 6, 2026
workflow on every deploy run
vmitsaras
marked this pull request as ready for review
July 6, 2026 13:04
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.
actions/configure-pages@v6withenablement: trueonly creates a new Pages site if one doesn't exist — if a site already exists with a non-workflowbuild type it silently accepts the wrong config, causingdeploy-pagesto immediately returndeployment_failed.Changes
.github/workflows/pages.yml— replaceconfigure-pages@v6with a directgh apicall that explicitly setsbuild_type: workflowvia PUT (update existing site) with a POST fallback (create if absent):permissions— addadministration: writesoGITHUB_TOKENhas authority to call the Pages update endpoint.