Hugo hosting on github instructions not working? cannot access './public': No such file or directory

I’m following the instructions as described here Host on GitHub Pages | Hugo

but step 8 fails with the upload artifact:

Run actions/upload-pages-artifact@v1
Run chmod -c -R +rX "$INPUT_PATH" | while read line; do
chmod: cannot access './public': No such file or directory
tar: public: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Error: Process completed with exit code 2.

Should I create an empty public folder in my repo’s main branch?

And will the generated site files than be pushed in the main branch/

Please share a link to your project repository.

Yes, here it is:

[

marceloverdijk/obsidiaan-website
github.com

](GitHub - marceloverdijk/obsidiaan-website)

In the config your have set publishDir: "_site" but then told GitHub actions that it is “public”.

You need to change it in one of the places.

If you want publishDir to be “_site” during development you can set it to “public” for production in config/production/config.yaml.

Ai that was a wrong copy …
I didn’t pay enough attention… sorry.
Will try later tonight when behind my pc.

Yes @frjo that fixed it. Thx again.

Also thx to @jmooring for always responding so quickly on this forum.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.