Home
Support Forums

Netlfiy deploys failed HUGO build

Hey Team,

since a few weeks now we’re experiencing a - what seems like - regression bug with Netlify builds for our HUGO site (v0.84.2). The issue is that Netlfiy is not detecting a failed build command and deploying the broken build, which leads to our site being offline until a successful re-build can be deployed again.

Here’s a an example of a failed build: Netlify App or a newer one here: Netlify App compared to a successful one here: Netlify App

The site is very large and experiencing build failures very frequently, which we’re aware of and working on, but it would be good if there’s a reliable way to not have the failed builds being deployed.

For a build to fail, it must return a non-zero exit code. There’s a chance that even if the build might be failing, the script is returning exist code as 0. Netlify relies on this code to detect build status. If Hugo is not sending the correct status, it’s worth reporting it to Hugo.

That’s the reason. I figured that HUGO doesn’t send an exit code anymore when it fails due to a race condition since 0.84.0. I’ll report it to them.

It works fine until 0.83.1 in case anyone else stumbles upon the same problem.

1 Like

I opened an issue in the HUGO repository Regression: HUGO not sending non-exit code when build fails · Issue #8749 · gohugoio/hugo · GitHub