Skip to content

ci: split deploy-pages workflow into build and deploy jobs#378

Merged
henryiii merged 3 commits into
mainfrom
henryiii/ci/split-deploy-job
May 20, 2026
Merged

ci: split deploy-pages workflow into build and deploy jobs#378
henryiii merged 3 commits into
mainfrom
henryiii/ci/split-deploy-job

Conversation

@henryiii
Copy link
Copy Markdown
Collaborator

🤖 Human guided, AI assisted PR (using this skill). AI text below. 🤖

Separate the monolithic build-and-deploy job into two jobs with an artifact between them:

  • Build job: only needs contents: read permission — checks out code, installs deps, builds the webapp, and uploads the pages artifact
  • Deploy job: has pages: write and id-token: write permissions, protected by a github-pages environment — configures pages and deploys

This follows the principle of least privilege by reducing the build environment's permissions and protects the deploy environment.

Assisted-by: OpenCode:glm-5

henryiii added 3 commits May 20, 2026 11:53
Separate the monolithic build-and-deploy job into two jobs with an
artifact between them. The build job only needs contents: read
permissions, while the deploy job has pages: write and id-token: write
permissions and is protected by a github-pages environment. This
follows the principle of least privilege and protects the deploy
environment.

Assisted-by: OpenCode:glm-5
Add pull_request trigger so the build job runs on PRs too. Gate the
deploy job with `if: github.event_name == 'push'` so it only runs
when pushing to main, not on PRs.

Assisted-by: OpenCode:glm-5
zizmor requires undocumented-permissions to have comments.

Assisted-by: OpenCode:glm-5
@henryiii henryiii merged commit 60df722 into main May 20, 2026
15 checks passed
@henryiii henryiii deleted the henryiii/ci/split-deploy-job branch May 20, 2026 16:47
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.

1 participant