From bace1333cc1a2fd8ca7bf4dd09f903bed1c0f7b0 Mon Sep 17 00:00:00 2001 From: John Medina Date: Sat, 6 Jun 2026 23:28:42 -0500 Subject: [PATCH] ci: add pnpm build gate on develop/main PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a Build gate workflow running `pnpm build` on push/PR to develop and main. `next build` performs the TypeScript type-check, so this catches incomplete provider integrations (PROVIDER_META / by_provider not wired) that break the tsc build — the recurring incident blocking main merges. Investigation: `pnpm build` requires NO build-time env vars. Verified in a hermetic run (env -i, no .env files, CI=true): EXIT=0, TypeScript step passes. App env access is lazy (inside route handlers/functions), so no secrets need to be configured in GitHub Actions for this gate. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..987f2b6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build gate + +# Catches broken builds (incl. incomplete provider integrations that skip +# PROVIDER_META / by_provider wiring and break the TypeScript step) BEFORE +# they merge. `next build` runs `tsc` type-checking, so this gate is the +# typecheck gate too. +# +# No secrets / env vars are required: env access in the app is lazy (inside +# route handlers and functions), so a hermetic `pnpm build` with no .env +# files and no env vars succeeds. Verified 2026-06-06. + +on: + push: + branches: [develop, main] + pull_request: + branches: [develop, main] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build (next build — includes TypeScript type-check) + run: pnpm build