botlabs-gg / yagpdb-docs-v2

YAGPDB's (new) documentation and custom commands course.
http://help.yagpdb.xyz/
Creative Commons Attribution Share Alike 4.0 International
6 stars 10 forks source link

Fix Hugo Builds For Good #6

Closed l-zeuch closed 9 months ago

l-zeuch commented 10 months ago

Some folks have reported that Hugo tends to fail with some odd errors along the lines of "Permission denied" whilst trying to build the site.

Investigating this on my personal machine I can reproduce the issue with just hugohugo server does not exhibit the issue. It appears as if this has to do with our usage of Hugo Modules and the fact that somehow those module files are being written to public/ with permission r--r--r-- instead of anything slightly more sensible, say, rw-rw-rw-.

Testing with hugo mod vendor before running hugo seems to fix the problem. Hence, I will be writing a build script to help with this process, as I also fear this will affect our CI/CD pipeline.