I use Hugo a lot, but it certainly looks like a problem that has nothing to do with it. Render does not delete previously generated files.
I did a simple HTML add / remove and confirmed this.
Hugo does not support deleting public folders.
This will continue to be a problem when using Hugo with Render.
The fact that it doesn’t build after reconnecting to GitHub seems to be another issue.
What Render does is pretty much a black box despite the console messages. If they don’t delete the public directory they create during the build–if they just do it incrementally even when you choose Clear Build cache and Deploy then something is wrong. Clearing the Build cache should start over instead of doing an incremental update. What else could “clear build cache” mean–it should mean CLEAR THE CACHE. They could be issuing the wrong Hugo command.
I deleted the static site completely and then recreated from the repo. Does nothing. Pretty messed up. Maybe because I used the same name, it kept detritus–pretty bad, but likely.
So, I tried with new name. Same problem.
Render will have to fix this. Some serious cache management problems. Render is probably using the repo name as an ID for the cache and the static site. In addition to just fixing this one site, seems like the workflow is wrong and Render needs to change the what the code does. Delete must mean DELETE–not “sort of remove with stuff hanging around.”
I built to a different directory. I was building to ./ (which works for my other static site using Hugo).
This time I built to ./public. This now works. There may still be detritus at ./ which Render should look at and figure out how to clean the cache.
I tried ./build and it said directory doesn’t exist. You’d think it would create it.
As this is all pretty much a black box (somewhat by design to “simplify”) so we can’t tell what directories do and don’t exist on the virtual space where the finished build resides. Probably might be good to know that.
Any way this fixes it but not a confidence-inspiring experience.