Skip to content

Run build on PRs; keep deploy gated to push:main#12

Merged
jayrav13 merged 1 commit into
mainfrom
add-pr-build-check
Apr 28, 2026
Merged

Run build on PRs; keep deploy gated to push:main#12
jayrav13 merged 1 commit into
mainfrom
add-pr-build-check

Conversation

@jayrav13

Copy link
Copy Markdown
Owner

Summary

  • Adds pull_request to the deploy workflow's triggers so every PR runs npm ci && npm run build and surfaces a status check.
  • Gates the deploy job and the Upload Pages artifact step on github.event_name == 'push' && github.ref == 'refs/heads/main' — PRs never deploy and never upload a Pages artifact.
  • Moves concurrency: group: pages from the workflow level down to the deploy job. Otherwise, a PR build kicked off mid-deploy would share the pages group and cancel the in-flight production deploy.
  • Closes Add PR-time build check (currently zero CI on pull requests) #8.

Test plan

  • This PR itself should now show a "build" status check (the meta-test for the change).
  • Confirm the deploy job is skipped on this PR (visible in the Checks tab).
  • After merge, confirm the next push to main still deploys end-to-end.

🤖 Generated with Claude Code

Closes #8. PRs now get a build status check; deploy job and Pages
artifact upload are gated to push events on main so PRs never deploy.
Concurrency moved from workflow level to the deploy job so PR builds
don't share the `pages` group with in-flight deploys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jayrav13 jayrav13 merged commit 1c1a098 into main Apr 28, 2026
2 checks passed
@jayrav13 jayrav13 deleted the add-pr-build-check branch April 28, 2026 23:42
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.

Add PR-time build check (currently zero CI on pull requests)

1 participant