Skip to content

Fix pkgdown deployment: split single job into build + deploy - #24

Merged
jeffstang merged 2 commits into
mainfrom
copilot/fix-pkgdown-url-generation
Mar 2, 2026
Merged

jeffstang merged 2 commits into
mainfrom
copilot/fix-pkgdown-url-generation

Conversation

Copilot AI commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

PR #23 placed environment: github-pages on the single pkgdown job, which applied deployment protection to the build step as well — causing PR workflows to block on action_required approval. The PR's own description identified the correct fix but the diff never implemented it.

Changes

  • Split pkgdown into two jobs

    • build: runs on all events (PRs + pushes); builds the site and uploads the Pages artifact via actions/upload-pages-artifact@v3; no environment protection
    • deploy: runs only on non-PR events; depends on build; carries environment: github-pages and deploys via actions/deploy-pages@v4
  • Updated workflow-level permissions from read-all to explicit scopes (contents: read, pages: write, id-token: write) required by actions/deploy-pages

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - ...
      - name: Upload Pages artifact
        if: github.event_name != 'pull_request'
        uses: actions/upload-pages-artifact@v3
        with:
          path: docs

  deploy:
    if: github.event_name != 'pull_request'
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/deploy-pages@v4

⚠️ Required manual step after merge

GitHub Pages source must be set to "GitHub Actions" in Settings → Pages → Source. actions/deploy-pages requires this; the old JamesIves action pushed to a gh-pages branch instead.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…tection issue

Co-authored-by: jeffstang <22566396+jeffstang@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pkgdown URL generation issue Fix pkgdown deployment: split single job into build + deploy Mar 2, 2026
@jeffstang
jeffstang marked this pull request as ready for review March 2, 2026 18:04
@jeffstang
jeffstang merged commit e3477dc into main Mar 2, 2026
5 checks passed
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.

2 participants