Skip to content

fix: switch GitHub Pages deploy to first-party actions#79

Merged
chris-prener merged 1 commit into
mainfrom
fix/gh-pages-deploy
May 31, 2026
Merged

fix: switch GitHub Pages deploy to first-party actions#79
chris-prener merged 1 commit into
mainfrom
fix/gh-pages-deploy

Conversation

@chris-prener

Copy link
Copy Markdown
Collaborator

Summary

Replace JamesIves/github-pages-deploy-action@v4 with GitHub's official actions/upload-pages-artifact@v3 + actions/deploy-pages@v4 to fix the 403 permission error when deploying to GitHub Pages.

Changes

  • Added permissions: block (contents: read, pages: write, id-token: write)
  • Split workflow into build + deploy jobs (required by deploy-pages)
  • Replaced third-party deploy action with first-party upload-pages-artifact@v3 + deploy-pages@v4
  • Added environment: github-pages with URL output
  • Simplified concurrency group to match Pages convention

Post-merge manual step

Required: Settings → Pages → Source → select "GitHub Actions" (not "Deploy from a branch")

Once confirmed working, the gh-pages branch can be deleted.

Closes

Closes #78

Replace JamesIves/github-pages-deploy-action@v4 with GitHub's official
actions/upload-pages-artifact@v3 + actions/deploy-pages@v4. This
eliminates the 403 permission error by deploying via the Pages API
with OIDC instead of git-pushing to the gh-pages branch.

- Add permissions: contents read, pages write, id-token write
- Split into build + deploy jobs (required by deploy-pages)
- Add github-pages environment with URL output
- Replace concurrency group to match Pages convention

Closes #78

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chris-prener chris-prener merged commit be17b54 into main May 31, 2026
6 checks passed
@chris-prener chris-prener deleted the fix/gh-pages-deploy branch June 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fix GitHub Pages deployment: github-actions[bot] denied push to gh-pages

1 participant