J. JieraltField Notes
Technical guide

GitHub Actions passed, so why did the Vercel build fail?

Treat CI and hosting as separate build environments; compare the commit, command, output directory and production branch.

A green CI run does not prove the production build passed

GitHub Actions and Vercel run separate builds. They can differ in Node version, environment variables, working directory and build settings. A green Actions check proves only that the workflow steps passed; it does not prove Vercel is connected to the intended repository, branch or output directory.

Align the exact commit first

Confirm that both systems built the same full commit SHA and branch. Then compare:

  1. Install and runtime: Is the lockfile committed? Do both use the intended Node version and a reproducible install such as npm ci?
  2. Build command: Do CI and Vercel run the same script, for example npm run build?
  3. Output directory: Read the build log to find where files were actually generated, then match Vercel's Output Directory. An Eleventy site may customize this to dist; do not assume _site.
  4. Environment variables: Are production variables present in the correct scope? Changing a variable generally requires a new build.
  5. Root directory: In a monorepo, does Vercel's Root Directory point to the directory containing package.json?

Find the first divergence in the logs

Look for the earliest failure in Vercel's build log, not only its final generic error. Rebuild the same commit locally from a clean dependency install and compare the paths Vercel checks with the paths the build produced. Never paste secret environment-variable values into an issue or log screenshot.

After the fix, push an identifiable commit and confirm both CI and Vercel report that SHA. Open the production URL as well. The deployment path is verified only when the build completes and the site responds.

References

Still not working after these steps?

Send me the error and your environment for a free first diagnosis. Hands-on help is quoted before any work starts.

Get a free checkor ask the forum
Want new fixes as they land?Subscribe via RSS →