Skip to content

ci: build every pull request before it can land - #70

Merged
serros404 merged 1 commit into
mainfrom
chore/ci-pr-build-check
Sep 18, 2026
Merged

serros404 merged 1 commit into
mainfrom
chore/ci-pr-build-check

Conversation

@0xd3lta

@0xd3lta 0xd3lta commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

main.yml only fires on push to main. Nothing builds a change before it merges — so a broken build is only visible once it is already on main, and at that point deploy never runs and the site silently stops updating (Pages keeps serving the last good deployment).

This closes that gap with a build-only check on pull_request. No deploy step. Does not overlap with main.yml — push vs pull_request.

Two deliberate choices

node-version: "20" — that is withastro/action@v2's default, which is what deploy actually runs on. The workflow never overrides it. Matching it here is the entire point: a green check means the deploy will build on the same Node, not merely on some Node.

npm ci, not npm install — the deploy action runs npm install, which quietly resolves around a lockfile that drifted from package.json. npm ci fails loudly instead, so drift surfaces in review rather than after the merge.

Self-testing

pull_request workflows run from the PR's merge ref, so this PR builds itself. The check on this page is the workflow proving it works.

Suggested sequence

Merging this first means #68 and #69 get a real Node 20 build before they land. Right now both were only verified locally on Node 24 — inside every package's supported range, but not the runtime the deploy uses. Once this is on main, a rebase or an empty commit on each closes that last gap.

🤖 Generated with Claude Code

The deploy workflow only fires on push to main, so nothing built a change
before it merged — a broken build was only visible once it was already on
main, and by then the site simply stops updating.

This adds a build-only check on pull_request. No deploy step, and it does not
overlap with main.yml (push vs pull_request).

Two deliberate choices:
- node-version is pinned to "20" because that is withastro/action@v2's
  default, which is what deploy actually runs on. Matching it is the point:
  a green check here means the deploy will build on the same Node.
- npm ci rather than npm install, so a lockfile that drifted from
  package.json fails loudly instead of quietly resolving something else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SCGof6E8MrS772HhsYZT5a
@serros404
serros404 merged commit 1d369ac into main Sep 18, 2026
1 check passed
@serros404
serros404 deleted the chore/ci-pr-build-check branch September 18, 2026 11:11
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