Fix GitHub Pages deployment: switch to Actions-based Pages source#11
Merged
Conversation
…gh-pages branch - Replace JamesIves/github-pages-deploy-action with actions/upload-pages-artifact and actions/deploy-pages for proper GitHub Actions Pages source deployment - Add required permissions (pages: write, id-token: write) at workflow level - Split into separate build (pkgdown) and deploy jobs for clean environment handling - Fix _pkgdown.yml URL to use https:// instead of http://
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job deploy
Fix GitHub Pages deployment: switch to Actions-based Pages source
Jul 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub Pages deployments by switching the pkgdown site publishing workflow from a branch-push (gh-pages) approach to the official GitHub Actions Pages artifact + deploy pattern, aligning with the repository’s Pages source setting (“GitHub Actions”).
Changes:
- Add Pages/OIDC workflow permissions and introduce an Actions-based Pages deployment flow (
upload-pages-artifact+deploy-pages). - Replace the branch-based
JamesIves/github-pages-deploy-actiondeployment with a separatedeployjob targeting thegithub-pagesenvironment. - Update the pkgdown site URL to use
https://instead ofhttp://.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/pkgdown.yaml | Switches deployment to Actions-based Pages artifact upload + deploy job, adjusting permissions accordingly. |
| _pkgdown.yml | Updates the site URL to https://waldronlab.io/AppStatBio/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+18
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write |
Comment on lines
+52
to
+55
| deploy: | ||
| if: github.event_name != 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| needs: pkgdown |
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
deployjob in thepages-build-deploymentpipeline was failing with"Deployment failed, try again later."because the workflow was pushing to thegh-pagesbranch viaJamesIves/github-pages-deploy-action, but the repository's Pages source is configured to "GitHub Actions" — which rejects branch-based deployments at the CDN layer.Changes
.github/workflows/pkgdown.yaml: ReplaceJamesIves/github-pages-deploy-actionwith the GitHub Actions Pages deployment pattern:actions/upload-pages-artifact@v3to packagedocs/after builddeployjob withenvironment: github-pagesusingactions/deploy-pages@v4pages: write+id-token: writepermissions at workflow level; dropcontents: write(no longer pushing to a branch)_pkgdown.yml: Fix site URL fromhttp://tohttps://(waldronlab.io/AppStatBio/)