Skip to content

Migrate GitHub Pages deployment to official first-party actions#390

Closed
Copilot wants to merge 1 commit intoalert-autofix-69from
copilot/sub-pr-388
Closed

Migrate GitHub Pages deployment to official first-party actions#390
Copilot wants to merge 1 commit intoalert-autofix-69from
copilot/sub-pr-388

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Replaces peaceiris/actions-gh-pages@v3 with official GitHub Pages actions to address code scanning alert #69 and align with GitHub's recommended deployment pattern.

Changes

  • Workflow structure: Split into separate build and deploy jobs following first-party action requirements
  • Permissions: Declared at workflow level (contents: read, pages: write, id-token: write) instead of job level
  • Deployment: Uses actions/upload-pages-artifact@v3 + actions/deploy-pages@v4 with OIDC authentication
  • Concurrency control: Added pages group to prevent simultaneous deployments

Migration details

Before:

- name: GitHub Pages action
  uses: peaceiris/actions-gh-pages@v3
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_branch: gh-pages
    publish_dir: toPublish

After:

# Build job
- name: Upload artifact
  uses: actions/upload-pages-artifact@v3
  with:
    path: toPublish

# Deploy job (separate)
- name: Deploy to GitHub Pages
  uses: actions/deploy-pages@v4

The official actions use implicit GITHUB_TOKEN with declared permissions rather than explicit token passing.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI assigned Copilot and gfs Feb 4, 2026
Copilot AI changed the title [WIP] Fix workflow permissions for code scanning alert Migrate GitHub Pages deployment to official first-party actions Feb 4, 2026
Copilot AI requested a review from gfs February 4, 2026 23:43
@gfs gfs closed this Feb 5, 2026
@gfs
Copy link
Contributor

gfs commented Feb 5, 2026

Superceded by #391

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