A static site can work on a developer’s machine while failing in a clean build because local assets or generated content were never committed.
Implementation approach
Use a reproducible Node version and lockfile, run validation before building, and inspect the generated output. Keep publishing inputs tracked or provide an explicit asset pipeline for ignored files.
Example
npm ci
npm run check
npm run build
Validation and edge cases
Test a fresh checkout, verify deep links and inspect image requests on a deployment preview. Check canonical URLs, feeds and redirects against the intended production domain.
Key takeaway
Keep preview deployments separate from production and merge only after reviewing the actual generated pages.




