Following the quickstart instructions Host on GitHub Pages | Hugo the prerequisites say "create a Hugo site and test it locally with hugo server, which I did successfully.
But Step 1 and 2 say “create a GitHub repo” and “push your local repo to GitHub”. After creating a repo on GitHub and cloning it locally, the local repo has only README, LICENSE and .gitignore, so the create and test a Hugo site should come after cloning the local repo.
I did that, so the local repo now has .github/workflows/hugo.yaml and the whole “website/” folder that works properly with hugo server. But when I push to GitHub the action fails on the Build with Hugo step: “Error: Unable to locate config file or config directory. Perhaps you need to create a new site”
.github/workflows/hugo.yaml and website/hugo.toml are present. What other config file is the build action looking for?
Yes, it is possible to push without pulling, but people can have used GitHub for years without ever doing so. In any case, it couldn’t hurt for the Hugo instructions to be explicit. This is a quckstart, and users of it can be expected to have varying levels of experience.
As an experienced software developer but new user of Hugo I believe others could be helped by a clue as simple as "Step one - create a GitHub repository (don’t check “Add a README file”). But this is your site, suit yourself.