Migrate to native GitHub Pages deployment (no gh-pages branch)#499
Merged
Migrate to native GitHub Pages deployment (no gh-pages branch)#499
Conversation
- Replace peaceiris/actions-gh-pages@v4 with native actions/deploy-pages@v4 - Add required permissions (pages: write, id-token: write) and environment - Add concurrency group to prevent deployment conflicts - Update linkcheck.yml to download Pages artifact instead of checking out gh-pages - Enables future deletion of gh-pages branch to reclaim ~300MB repo space Closes #419
7 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s GitHub Pages deployment from a branch-based approach (gh-pages + peaceiris/actions-gh-pages) to GitHub’s native artifact-based Pages deployment, and updates link checking to run against the deployed Pages artifact instead of the gh-pages branch.
Changes:
- Update Pages publishing workflow to use
actions/configure-pages,actions/upload-pages-artifact, andactions/deploy-pages. - Add workflow-level Pages permissions, concurrency, and a CNAME file step for the custom domain.
- Update linkcheck workflow to download and extract the Pages artifact and run link checking against it.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/publish.yml | Switch deployment to artifact-based GitHub Pages and add Pages environment/concurrency/CNAME handling. |
| .github/workflows/linkcheck.yml | Replace gh-pages checkout with downloading and extracting the Pages artifact for link checking. |
…ts for linkcheck - Add actions: read permission to publish.yml (needed by dawidd6/action-download-artifact) - Switch linkcheck.yml from expiring Pages artifact to permanent release asset (tar.gz) - Eliminates dependency on artifact retention window for link checking
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
Replaces the branch-based
peaceiris/actions-gh-pages@v4deployment with GitHub's native artifact-based Pages deployment (actions/deploy-pages@v4).Changes
publish.yml:
peaceiris/actions-gh-pages@v4withactions/configure-pages@v5+actions/upload-pages-artifact@v3+actions/deploy-pages@v4pages: write,id-token: write,contents: write)github-pagesenvironment with deployment URL outputpython-programming.quantecon.org)linkcheck.yml:
checkout ref: gh-pageswith downloading the Pages artifact from the publish workflowWhy
Post-merge steps
After merging and verifying a successful deploy:
gh-pagesbranch to reclaim spaceSee the companion issue for the full post-merge procedure.
Closes #419