Github site not displaying the most recent code on MASTER branch

  • Site name: joshuel-dot-com
  • No DNS issues that I’m aware of.
  • No build problems.

I’m trying to deploy a static HTML site from a private repository I’ve granted Netlify access to for deployments, but for some reason it’s not pulling in the latest index.html file from the publish directory I’ve set (“dist”).

The weird thing is that the deployment preview works as expected - I can see the updated index.html code in the preview…

However, when I visit the published Netlify version @ https://joshuel.com it’s showing the old index.html file that no longer even exists anywhere in the new repository that this site is pointed to. I can see all the JS and old code.

I assume this has something to do with my site expecting a CI configuration and looking for code that isn’t there, but I’m not sure where to start. How do I override the old code and have it just deploy the index.html file I’ve committed to my /dist/ folder?

hey there, are you deploying via CI? could we see a screenshot of your build settings please?

Yeah and I suspect that’s the problem - I wanted to start fresh without gatsby or any SSR, but I did away with the CI config as well I think. I wasn’t able to find any information on converting an existing site to not use CI, e.g. convert from CI to Drop, but ideally I’d like to setup CI on this so let me know where to start if that’s the problem!

i can’t see your repo as it is set to private, but if you have a dist/ directory that needs to be the base directory ( you dont need a publish directory as you are not building anything). as long as that directory contains an index.html, it should trigger a deploy (which can take a few mins, even for static prebuilt sites, it is not instantaneous) when you push an updated commit.

let me know if that helps!

1 Like

Thank you @perry I’m extremely grateful for your input. I apologize if I sounded terse and pushy. I work on a relationship marketing team and it’s super busy season so I need to be mindful of which hat I’m wearing outside of my work chat lol.

I do have a /dist folder with an index.html file, but it appears it’s still using the old version of that index.html when I visit live site after setting the base folder to dist/

Notice the gatsby.js includes in the head section of the site’s html. Those js files should all be gone, and the BG of the site should be black(ish).

Here’s a screenshot of my folder structure in git:

happy to help :smiley:

can you pop a screenshot of your build settings please?

also: just so you have a backup plan, does updating via drag n drop work?

1 Like

To answer your question about drag n drop: Yes Netlify Drop works, but I’d reaaaally like to learn how to get this working in a CI setup (not migrate it to drop) so that when I get the template all ironed out with raw HTML/CSS I can start building it into Svelte or something that works with Netlify (with CI/CD).

yep, i was just making sure you had a backup plan!

Your settings all look OK to me actually.

the only other thing i can think of is that the files are not getting updated because they aren’t changed (sanity check: you are committing and then pushing the changed files to master, right?) OR perhaps your gitignore is being a bit overealous?

maybe you can link me to one of these deploys that should update the site but doesn’t after checking those two things?

1 Like
  1. Definitely only working on Master because I’m a filthy bad dev (notice the lack of js includes after the last style tag in the head) :

  2. .gitignore contents:

    .history/*
    joshuel_dot_com.code-workspace

  3. Latest deploy that I was fully expecting to work: Netlify App

hi there, can you change dist/ to dist, make some changes, commit, push? one more thing i want to check and that still doesn’t fix it, we’ll need some new :eyes: as your build log looks clean and i’m a bit stumped.

1 Like

Looks like it didn’t pick up the latest commit (Added a comment at the end of my CSS in the head of index.html) and it also didn’t care that I removed the / at the end of base dir field: “dist/” -> “dist”

sadface! I appreciate your help anyway though. Beginning to wonder if I need a minimal SSR build to make this work with CI/CD…

I think I figured it out. So I emptied the base dir field, then set the publish field to “public” and moved my files over to “public”, pushed to master, and voila.

I had to CTRL+Refresh to see the changes reflected on the live site.

Thanks for all the help @perry!

It looks like now I have a different issue… the page looks like it’s cached in a weird way - when I click on the contact page link and then click the “back” button in the browser -OR- if I visit the site from a new browser window, it still renders the old index.html… Probably going to open a new ticket for that though.

1 Like