Skip to content

Fix GitHub Pages deployment: switch to Actions-based Pages source#11

Merged
lwaldron merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job
Jul 3, 2026
Merged

Fix GitHub Pages deployment: switch to Actions-based Pages source#11
lwaldron merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The deploy job in the pages-build-deployment pipeline was failing with "Deployment failed, try again later." because the workflow was pushing to the gh-pages branch via JamesIves/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: Replace JamesIves/github-pages-deploy-action with the GitHub Actions Pages deployment pattern:
    • actions/upload-pages-artifact@v3 to package docs/ after build
    • Separate deploy job with environment: github-pages using actions/deploy-pages@v4
    • Add pages: write + id-token: write permissions at workflow level; drop contents: write (no longer pushing to a branch)
  deploy:
    if: github.event_name != 'pull_request'
    needs: pkgdown
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/deploy-pages@v4
  • _pkgdown.yml: Fix site URL from http:// to https:// (waldronlab.io/AppStatBio/)

…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
Copilot AI requested a review from lwaldron July 3, 2026 16:29

@lwaldron lwaldron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@lwaldron lwaldron marked this pull request as ready for review July 3, 2026 18:22
Copilot AI review requested due to automatic review settings July 3, 2026 18:22
@lwaldron lwaldron merged commit 9561094 into main Jul 3, 2026
2 checks passed
@lwaldron lwaldron deleted the copilot/fix-deploy-github-actions-job branch July 3, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-action deployment with a separate deploy job targeting the github-pages environment.
  • Update the pkgdown site URL to use https:// instead of http://.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants