GitHub integration, build, and logs
Vercel and GitHub as one organism
The Vercel for GitHub integration is the glue of the whole workflow. Once the account is connected, Vercel watches the repository and reacts to every push and PR — without manually triggering deploys. At ProfessNet it is what connects GitHub Actions with the deploys of the ZEUS frontend.
What the integration gives you
| Feature | Effect |
|---|---|
Auto-deploy from main | Push = a new production deploy |
| Preview for a PR | A comment with a link in every Pull Request |
| Status checks | The build status visible in the PR next to the tests |
| Commit ↔ deployment | Every deploy linked to a specific SHA |
The build flow
A build on Vercel has fixed stages. Knowing them helps you locate an error:
- Cloning — fetching the repository at a specific commit.
- Installing dependencies —
npm install(with cache ifpackage-lockhas not changed). - Building —
next build, including compilation, types, page generation. - Deploying — publishing the artifacts to the Edge Network.
# Locally reproduce what Vercel does
npm ci
npm run build
Reading the logs
Build logs
Project → Deployments → the chosen deploy → the Building tab. Here you will find the exact cause of a failed build: a TypeScript type error, a missing environment variable, an import error.
Runtime logs
For serverless/SSR functions, use the Logs (or Runtime Logs) tab. They show requests, response times, and errors from API routes after deployment.
# Stream production logs from the CLI
vercel logs <deployment-url> --follow
Tip: When "it works for me but not on Vercel" — first run
npm ci(notnpm install) andnpm run buildlocally.npm ciinstalls exactly the versions frompackage-lock.json, just as Vercel does.
Diagnosing failed deploys
The most common causes and what to check:
| Symptom | Likely cause |
|---|---|
Type error in the build | A type error — next build stops on them |
Cannot find module | A missing dependency in package.json |
undefined at runtime | A missing environment variable in the given env |
| Build OK, page 500 | A runtime error — check Runtime Logs |
| Incompatible version | A different Node locally than in Project Settings |
Rollback and Instant Rollback
If a fresh deploy breaks production, in Deployments point to the previous, working deploy and click Promote to Production (Instant Rollback). The rollback is instant because the previous build still exists.
Ignoring unnecessary builds
In a monorepo not every commit concerns the frontend. The Ignored Build Step setting lets you skip the build when changes did not touch the given project — it saves time and limits.
Summary
The GitHub↔Vercel integration automates deploys and PR previews. When something fails,
read the logs: Building for compilation errors, Runtime Logs for errors after
deployment. npm ci + npm run build locally reproduces Vercel's environment, and
Instant Rollback saves production with one click.