Add build step to CI - #410
Open
bcw117 wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Pull request overview
This PR adds a dedicated GitHub Actions CI workflow to verify the Next.js application builds successfully, closing the gap where CI previously only enforced formatting.
Changes:
- Introduces a new
Buildworkflow that runs onpull_requestand pushes tomain. - Runs
pnpm install --frozen-lockfilefollowed bypnpm build(with placeholder env vars) to catch build breakages during review. - Adds workflow-level concurrency to cancel stale builds for the same ref.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bcw117
marked this pull request as ready for review
August 2, 2026 21:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features and Changes
Adds a
BuildGitHub Actions workflow (.github/workflows/build.yml) that runspnpm buildon every pull request and on pushes tomain.Until now the only CI we had was the Prettier/
Lintworkflow, which means a PR could be merged with code that doesn't compile — formatting was checked, but nothing ever verified that the Next.js app actually builds. This closes that gap so build breakages are caught in review instead of at deploy time.Details worth calling out:
Lintworkflow. Sameactions/checkout@v4,pnpm/action-setup@v4.0.0pinned to pnpm10.14.0, so both workflows stay in sync. Addsactions/setup-node@v4on Node 20 withcache: pnpmto keep installs fast.pnpm install --frozen-lockfileinstead of a barepnpm install, so CI fails loudly ifpnpm-lock.yamlis out of date rather than silently resolving something different from what we committed.pnpm buildrunsprisma generate && next build, and several modules construct their clients (Prisma, Supabase, Mailgun, Notion) at import time. Those clients need the variables to be present and well-formed — a malformedDATABASE_URLfails Prisma's URL parsing, for example — so the job defines dummy values. Nothing in this list is a real credential and no external service is contacted during the build; the comment in the file says as much so nobody mistakes them for secrets that need rotating.github.refwithcancel-in-progress: true, so pushing several commits to a PR in quick succession cancels the stale builds instead of queueing them all.Screenshots / Screen Recordings
N/A — CI-only change, no UI surface.
Testing your changes
The workflow triggers on
pull_request, so opening this PR is itself the test: theBuild / Next.js buildcheck on this PR is the first real run, and it needs to go green before this merges.Steps on how to test your changes
Build / Next.js buildpasses.build.ymland runpnpm install --frozen-lockfile && pnpm build.Other Notes
mainbefore it can actually block a merge. Worth doing as a follow-up, otherwise this is advisory only.next builddoes,pnpm lint(ESLint), and tests are not wired into CI. The existingLintworkflow only runs Prettier. Those are natural follow-ups but felt out of scope for a first build step..env.cifile instead.