Netlify publishes old website after Github update (continuous deployment)

I am working on my personal website (https://gallant-elion-e70d18.netlify.app/), first time in over three months. I use Hugo Academic in RStudio, then push the files to Github, and then typically wait 1 minute for Netlify to catch up and public the updated website (I have continuous deployment activated).

What I did now was this:

  • I updated hugo to version 0.69.2.
  • I updated netlify.toml accordingly to reflect hugo’s latest version.
  • I updated the website content that I wanted.
  • I cleaned the Public folder, ran blogdown::serve_site(), and verified locally that the website looks as I want.
  • I pushed all files to Github (all seems up to date here).
  • I waited about 1 minute for Netlify to catch up and publish the ‘new’ site.

But, the website is still the old one.
I did look into the log file but I honestly saw nothing obviously wrong:

10:57:10 PM: Build ready to start
10:57:12 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
10:57:12 PM: build-image tag: v3.3.7
10:57:12 PM: buildbot version: e2864b9f6fb42f8598086b4caa617ac9e650a222
10:57:12 PM: Fetching cached dependencies
10:57:12 PM: Starting to download cache of 299.1MB
10:57:18 PM: Finished downloading cache in 6.227582147s
10:57:18 PM: Starting to extract cache
10:57:26 PM: Finished extracting cache in 7.900627395s
10:57:26 PM: Finished fetching cache in 14.22633183s
10:57:26 PM: Starting to prepare the repo for build
10:57:27 PM: Preparing Git Reference refs/heads/master
10:57:29 PM: Found Netlify configuration file netlify.toml in site root
10:57:29 PM: Found Netlify configuration file(s). Overriding site configuration
10:57:29 PM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘hugo --gc --minify’ versus ‘hugo’ in the Netlify UI
10:57:29 PM: Starting build script
10:57:29 PM: Installing dependencies
10:57:30 PM: Started restoring cached node version
10:57:34 PM: Finished restoring cached node version
10:57:35 PM: v10.20.1 is already installed.
10:57:36 PM: Now using node v10.20.1 (npm v6.14.4)
10:57:36 PM: Attempting ruby version 2.6.2, read from environment
10:57:38 PM: Using ruby version 2.6.2
10:57:38 PM: Using PHP version 5.6
10:57:38 PM: Installing Hugo 0.69.2
10:57:39 PM: Hugo Static Site Generator v0.69.2-EC9DCF30/extended linux/amd64 BuildDate: 2020-04-24T07:57:53Z
10:57:39 PM: Started restoring cached go cache
10:57:39 PM: Finished restoring cached go cache
10:57:39 PM: unset GOOS;
10:57:39 PM: unset GOARCH;
10:57:39 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
10:57:39 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}”;
10:57:39 PM: go version >&2;
10:57:39 PM: export GIMME_ENV=‘/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
10:57:39 PM: go version go1.12 linux/amd64
10:57:39 PM: Installing missing commands
10:57:39 PM: Verify run directory
10:57:39 PM: Executing user command: hugo --gc --minify
10:57:39 PM: Building sites …
10:57:41 PM: | EN
10:57:41 PM: -------------------±-----
10:57:41 PM: Pages | 272
10:57:41 PM: Paginator pages | 10
10:57:41 PM: Non-page files | 157
10:57:41 PM: Static files | 34
10:57:41 PM: Processed images | 79
10:57:41 PM: Aliases | 23
10:57:41 PM: Sitemaps | 1
10:57:41 PM: Cleaned | 227
10:57:41 PM: Total in 1740 ms
10:57:41 PM: Skipping functions preparation step: no functions directory set
10:57:41 PM: Caching artifacts
10:57:41 PM: Started saving pip cache
10:57:41 PM: Finished saving pip cache
10:57:41 PM: Started saving emacs cask dependencies
10:57:41 PM: Finished saving emacs cask dependencies
10:57:41 PM: Started saving maven dependencies
10:57:41 PM: Finished saving maven dependencies
10:57:41 PM: Started saving boot dependencies
10:57:41 PM: Finished saving boot dependencies
10:57:41 PM: Started saving go dependencies
10:57:41 PM: Finished saving go dependencies
10:57:41 PM: Build script success
10:57:41 PM: Starting to deploy site from ‘public’
10:57:41 PM: Creating deploy tree asynchronously
10:57:41 PM: Creating deploy upload records
10:57:44 PM: 194 new files to upload
10:57:44 PM: 0 new functions to upload
10:57:47 PM: Starting post processing
10:58:10 PM: Post processing done
10:58:10 PM: Site is live
10:58:23 PM: Finished processing build request in 1m11.370610987s

I also tried to press “Retry deploy” at my published deploy, but to no avail.

What am I missing?
Thank you in advance.

hmm, that is confusing. I know its been a few days since you wrote in, has it still not updated?

Hi Perry, thanks for the reply.
No, unfortunately it hasn’t updated.

In the meanwhile I tried to download the deployed version from Netlify and I looked at the files.
I can see new files there (new content files, including PDFs that I now added). But, the index.html and the index.xml files of the pages with the new content are still the old version files, although in Github I can see they are the updated versions.

In short: Netlify downloads the latest files from Github (the name of Github push shown in Netlify is correct), but when building the website it does not generate new index.html files where the changes occurred. So the added new material has no way to be shown.

Since I posted I tried many different things, I pushed slight variations to Github many times. But nothing works and I am completely lost right now. Any tips are highly appreciated, thanks.

hi there, i just wanted to let you know we are still thinking about this and haven’t forgotten - we hope to get back to you with some more thoughts shortly.

Hi Perry, many thanks, your efforts are truly appreciated.
I am still stuck here.

In the meanwhile I tried my luck and also posted my problem at the RStudio Community forum. I reasoned that maybe I could trick Netlify to build the website like I do locally in RStudio through blogdown and hugo. I realized that there were some slight differences when building the website locally depending on the command I used, so I wondered whether I could capitalize on this within Netlify. This may give you some tips as to where the problem in Netlify lies. I hope it won’t put you on the wrong foot, though.

Thanks a lot, I am looking forward to hearing back from you.

I know it’s been a long time and I hate to ask this but…what site are you using? Perry had thought we’d be able to connect the dots from your build log, but it looks just like everyone else’s build log - no unique strings I can try to search for to pick it out from the noise, and you don’t seem to use the same email here and on our service. You could tell me the site subdomain (yoursitename.netlify.com) or the public URL or the API Site ID from your settings page.

More useful next steps than that while you get back to me and you wait for me to see your response:

  1. have you downloaded a copy of your deploy as shown in the screenshot in this article, to confirm that your updates got built? [Support Guide] I’ve deployed my site but I still see "Page not found”
  2. if those assets look correct and different from what you see on the web, could you share with us the value of the x-nf-request-id http response header for some wrong asset? This article has more details: [Support Guide] Netlify Support asked for the 'x-nf-request-id' header? What is it and how do I find it?

Hi,

I’m not sure I fully understood your post but I’ll do my best to provide you with the requested info.

I don’t understand what you mean when you ask me what site I’m using. As I said in my OP, my website is at gallant-elion-e70d18.netlify.app (default subdomain) or, if you prefer, www.jorgetendeiro.com (primary domain). My site name is
gallant-elion-e70d18
and the API ID is
19aab805-f82f-4f4e-a279-2c49379b9fc0
But all this info should be obvious to you, so I fear I am missing your question.

As for my email, I surely am using the same email here and on your service (jorgetendeiro@gmail.com), so I don’t understand your comment.

Concerning your numbered list:

  1. Yes, and I said so on post #3. And just now I did it again for the latest published deployed version. What I wrote on my 3rd post still applies:

In the meanwhile I tried to download the deployed version from Netlify and I looked at the files.
I can see new files there (new content files, including PDFs that I now added). But, the index.html and the index.xml files of the pages with the new content are still the old version files, although in Github I can see they are the updated versions.
In short: Netlify downloads the latest files from Github (the name of Github push shown in Netlify is correct), but when building the website it does not generate new index.html files where the changes occurred. So the added new material has no way to be shown.

For completeness: I do not have this problem locally. Locally, hugo builds the website correctly and all index.html files are the latest. Also, the files at Github all seem fine too, they are well synced with my latest commit and all index.html files are the latest.

  1. Here’s the value of the x-nf-request-id http response header for some wrong asset (from Chrome):
    fb3159ca-d0c5-4826-8da3-571a927ad33d-6681248
    This pertains to Lectures | Jorge N. Tendeiro. Here the info is not up to date, although it should be (an item from 2020 at the top of the page is missing).

Please do ask me for further information that may be of help to you, I will be sure to provide it asap.

Many thanks!

hey there,

thanks for that additional information! we haven’t given up on this yet, but the person who is most likely able to help is out this week.

it might take a few days, but we will get back to you. are you able to build locally and then publish via the CLI or drag n drop at all in the meantime?

Hi Perry,

I just followed your advice. I installed netlify CLI, built locally, and deployed the local version. It worked perfectly.

I will then await for a permanent fix on the continuous deployment issue.

Thank you for your continued efforts!

Hi, @bigoten, the first thing to consider is are we comparing the same things. You state above that you are running blogdown::serve_site() locally. However, this is not what you do at Netlify.

Based on the netlify.toml file for in the deploy for the x-nf-request-id above, I have worked out the command being run at Netlify when we build the site. It is the command below:

HUGO_VERSION = "0.69.2" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" hugo

Would you be willing to please run the same command locally and let us know what it shows? After runring that command (and only that command) and then check the contents of the public directory to see if the page in question contains the new post.

If the page doesn’t, then that is your issue. The build locally matches the build at Netlify. You will need to find the solution for the local issue and then do the same thing at Netlify.

If the local page does contain the post then there is some difference between the local build and the Netlify build. If this is the case we can help track that down.

​Please let us know your results and we’ll be happy to troubleshoot from there.

Hi Luke,

I tried to do as you say. I think I checked it well but I am not entirely sure tbh. AFAIK, hugo uses the setting in config.toml to build the website. Below is the current version of config.toml (NB: In the meanhwile I upgraded hugo to version 0.70.0, but it changed nothing):

title = "xxx"
baseurl = "xxx"
copyright = "xxx"
theme = "hugo-academic"
enableGitInfo = true

defaultContentLanguage = "en"
hasCJKLanguage = false 
defaultContentLanguageInSubdir = false
removePathAccents = true

paginate = 10
enableEmoji = true
footnotereturnlinkcontents = "<sup>^</sup>"
ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]

[module]
  [module.hugoVersion]
    min = "0.69.2"

[outputs]
  home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
  section = [ "HTML", "RSS" ]

[mediaTypes."application/manifest+json"]
  suffixes = ["webmanifest"]

[outputFormats.WebAppManifest]
  mediaType = "application/manifest+json"
  rel = "manifest"

[markup]
  defaultMarkdownHandler = "goldmark"
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true
  [markup.highlight]
    codeFences = false 
  [markup.tableOfContents]
    startLevel = 2
    endLevel = 3

[imaging]
  resampleFilter = "lanczos"
  quality = 90
  anchor = "smart" 

[taxonomies]
  tag = "tags"
  category = "categories"
  publication_type = "publication_types"
  author = "authors"

[privacy]
  [privacy.disqus]
    disable = true
  [privacy.googleAnalytics]
    disable = true
  [privacy.instagram]
    disable = true
  [privacy.twitter]
    disable = true
  [privacy.vimeo]
    disable = true
  [privacy.youtube]
    disable = true

I hope this provides you with the relevant information, but if not please ask me again.
Thanks again.

I think this is where we’ll have to ask you to do a bit more homework. We can’t consult in depth on source code debugging, but we can guide you as you do so. Here’s how to use our build system locally, and then you can work on getting it to output the right thing:

If you get that running and run your build in there (once you start it up in a clean copy of your repository, you’ll run build hugo --gc --minify to start the build), and you find that what you’ve built does not match what we’ve built (which you can download a copy of here: Netlify App, using the icon in my below screenshot), then we’ll be ready to help you troubleshoot further.

If you find they are the same, then this is a build issue you’ll need to work out yourself :slight_smile:

I haven’t replied in a while, but I finally managed to sort out my problem. I am posting the solution here for completeness and also in the hopes it may help others.

My problem boiled down to a ridiculous issue that is entirely Netlify-independent (sorry!..).

I wanted to add some to-come events on my page (I use Hugo Academic). There’s a field in the Markdown file called ‘publishDate’, which I erroneously filled in with the (future) event date. And that is the reason why the content was not visible after deploying. It became visible on my first deploy after that date… So I learned my lesson, for me ‘publishDate’ by default is now always 2020-01-01 for good measure :slight_smile:

Again, my apologies and thank you for all the assistance.

No worries - mostly glad you got things sorted!

For people who find themselves in a situation - there is a command line flag to hugo that shows those!

-F, --buildFuture include content with publishdate in the future

(from hugo | Hugo)