Hugo Netlify Preview build is not the same as production

Hi there! I’m having a weird issue where my Hugo prod app is not updating even though Netlify has built the latest branch. I can also see my changes in the Netlify preview deploy button but again, not in prod.

Steps taken

  • There are no errors on the build and the build output seems correct.
  • I’ve opened up the prod site in different browsers, on mobile, and in a private browser in case there was a caching issue. But that hasn’t resolved it.
  • If I start hugo locally, I can match what I see in the Deploy Preview.

Site name is: elastic-engelbart-26e6d9.
Hugo version: 0.74.3

Any assistance would be greatly appreciated! Thankyou!

A quick update, I think there’s an issue with the CDN for my prod site. Is there a way to get my sites cache invalidated?

I fixed my issue by reimporting my github repo!

For future reference, yes there are a few ways to clear cache, and generally the first steps to showing the problem to us so we can help is to find the value of the x-nf-request-id HTTP response header, of the request for an asset you are seeing that is not up to date. This article describes that process:

While we have occasionally had bugs that lead to stale content, usually there is some other cause and/or you can self-serve on a fix:

  1. a redeploy will fix most, regardless of the cause (successful production deploys clear production cache)
  2. most that aren’t fixed by that are caused by custom Cache-Control HTTP headers that you (or your framework) as configured - be careful not to do that (details in this article) or by a misconfigured service worker (details in this article).
  3. Or perhaps you did not have the deploy you intended published. This might happen because we only publish commits to your production branch at your production URL, or because you’ve configured locked deploys and we are faithfully serving an old deploy and our UI will say this (you’ll see a “published” notice on an older deploy, and there will be a button to Start auto-publishing at the top of your deploy logs listings page).

If you see it again, check the details from #2 / #3, and if they don’t seem relevant, provide us with the detail from #1 and we’ll be happy to investigate!