Subsequent builds are not updating site

Hi, my site suspicious-hawking-c67abd is up and running, but when I go to deploy the new update it still renders the original.

I looked through the netlify community and saw why my build kept failing so I took care of it by creating a netlify.toml file:

[build]
publish = "./public"

The build is now deploying successfully, but it is not rendering any of the changes.

Also, it is pulling from my github repo and I have a custom domain from GoDaddy if that makes any difference.

Hello @emerykurt! Welcome to the Netlify Community :wave:!

Hm, that’s definitely odd. Here’s a few things you could try:

Verify that the build runs locally on your computer and take note of the directory that gets generated, be sure that the directory listed in your netlify.toml file is actually the one that contains your build artifacts. Personally for simple builds, I prefer to set the deploy settings up using the web interface. To adjust settings visit your project page and click “Deploy Settings”.

At the top of the page under “Build settings”, click edit, then fill out your build settings as needed:

You can also see what Netlify deployed by going to the last published build and clicking the download button. This will download a copy of the directory that Netlify pushed live.

Do you have a repository you can share as well? Knowing what your setup looks like might help other contributors to the community get an idea of what your build setup looks like. Hopefully what I’ve put above can be some help, definitely post a reply if I or anyone else can help further!

Here is the link to the github repo: https://github.com/emerykurt/emery-kurt-portfolio

Also, I did your suggestion and I am still not getting any update to the website. It works when I run it locally, but not on the server.

Just took a look at your repo. I think I’ve identified the issue:

When you include a netlify.toml file in your repository, any settings you’ve set in the web interface are ignored. Your netlify.toml file therefore does one thing, and one thing only: deploys the public directory, every time. If the contents of public don’t change than the site will never get updated.

Firstly, if public is the directory you’d like to deploy, I’d:

  1. Delete it from your git repository and commit the changes (don’t push yet).
  2. Add public to your .gitignore. This will ensure that it doesn’t get checked back in to version control. It’s usually a good idea to keep generated files out of git as these will change every build and could result in a lot of changes that git then has to track in addition to your source files.

From here, there’s 2 ways you could go:

  1. Delete the netlify.toml file and configure the settings for your build via Netlify’s dashboard, as I described above.
  2. Update your netlify.toml file with your build settings. That would look something like this:
    [build]
      base = "<your-base-dir (optional, defaults to current dir)>"
      command = "<your-build-command>"
      publish = "<your-build-dir>"
    
    # ...additional contexts...
    
    # ...redirects...
    
    # ...headers...
    
    See more about configuring a netlfiy.toml file here: https://docs.netlify.com/configure-builds/file-based-configuration
  3. Once you’ve done the above (updated your .gitignore and revised/deleted netlify.toml), you can now commit and push your changes. Your build should start automatically once Github informs Netlify of changes and the site should update successfully.

Good luck!

1 Like

I made the changes, and I deployed with clearing the cache just in case. It is still not updating.

Odd…can you confirm builds are triggering and deploying? Does the preview link for each build show the updated site or does it all show the same? Worst case scenario, you could always try deleting the site and creating a new one. Other than there being an issue with the build itself, I’m not sure what else would cause a site to not update…perhaps @fool or @perry can offer more insight, or at least triage this issue further.

I appreciate the time and effort that you put into helping me @noelforte. Hopefully, I can get a resolution soon!

Hey @emerykurt,

Firstly, @noelforte, thanks for taking a look in to this; appreciate it <3!

The issue is relatively straightforward: auto publishing for the site is turned off. You’ll want to enable this to ensure that the latest successful builds are automatically published!

I turned it back on and now this is what happens when I click on my website.

Page Not Found

Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.

Back to our site

If this is your site, and you weren’t expecting a 404 for this path, please visit Netlify’s “page not found” support guide for troubleshooting tips.

Hey @emerykurt, can you follow the support guide for further guidance? I’d be very, very surprised if that magical document didn’t contain the answer :mage:!