ci: fix Pages deployment — switch to native artifact model - #8
Merged
Conversation
The peaceiris/actions-gh-pages branch-push approach was correctly pushing MkDocs output to gh-pages, but the repo has a deployed actions/deploy-pages@v5 workflow running as well. This created a 'deployment_queued' loop in the workflow-based model that never resolved. Switch to the native GitHub Pages artifact model: - actions/configure-pages@v5 sets up the Pages environment - actions/upload-pages-artifact@v3 uploads the MkDocs site/ output - actions/deploy-pages@v4 deploys the artifact Also switched the Pages source from 'gh-pages/ legacy' to 'workflow' mode via the Pages API.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the documentation deployment workflow to use GitHub Pages’ native artifact-based deployment model instead of pushing to a gh-pages branch, aligning the pipeline with configure-pages + upload-pages-artifact + deploy-pages.
Changes:
- Switch workflow permissions from
contents: writeto the Pages/OIDC permission set (contents: read,pages: write,id-token: write). - Replace
peaceiris/actions-gh-pagesbranch-push deployment with Pages artifact upload +actions/deploy-pages. - Add workflow-level concurrency configuration for Pages-related runs.
Comment on lines
+58
to
+62
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Upload build artifacts | ||
| if: github.event_name == 'pull_request' | ||
| uses: actions/upload-artifact@v4 | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
The
peaceiris/actions-gh-pagesbranch-push approach was correctly pushing MkDocs output togh-pages, but the repo has a workflow-based deployment usingactions/deploy-pages@v5that was stuck in adeployment_queuedloop — the two models conflict.This switches to the native GitHub Pages artifact model:
actions/configure-pages@v5— sets up the Pages environmentactions/upload-pages-artifact@v3— uploads the MkDocssite/outputactions/deploy-pages@v4— deploys the artifactAlso switched the Pages source from
gh-pages / legacytoworkflowmode via the Pages API.