I just read the documentation for deploying on GitHub Pages. Neat! I went to GitHub to try it out in my project repo, at Settings > Pages, and saw that GitHub had already pre-populated a hugo.yaml file for me based on inference from the repo contents.
I was pleased to see the action ran successfully, but was puzzled by the results: “Your site is live at https://corleissen.com/corleissen.com/”.
I suspect the problem may lie in the fact that my project and website predate GitHub Actions themselves. Formerly, one had to maintain two separate repos in order to keep a project’s contents private: one, the project repo (private); and two, the repo for GitHub pages itself. This is what I did. My old workflow was to build my server in the private repo, then copy the contents of /public/ to the public repo, including a CNAME for a custom domain.
I like the current workflow and would like to use it, but I’m not sure how to resolve the site-within-a-site conundrum or what to do with the (now deprecated?) public repo. I’m don’t know what to do, and would gladly welcome guidance.
NOTE: Discourse thinks I’m a new user despite having a thread that’s six years old. I’d link to resources more helpfully, but I’m limited in the number of links (and screenshots) I can provide!
what is your Hugo configuration (baseURL for instance)
what is your Github deploy script/method
what is your CNAME configuration?
If the links on https://corleissen.com/corleissen.com/ all point to https://corleissen.com/ without the subdomain, then your Github config is the culprit. If not, then your GoHugo config. Both are blackboxes for us
what is your Hugo configuration (baseURL for instance)
The baseURL is https://corleissen.com. My site is one page and the only links are to social media, so that’s currently untestable.
what is your Github deploy script/method
To produce the https://corleissen.com/corleissen.com result? GitHub Action with hugo.yaml.
To produce https://corleissen.com, I run hugo server in my project repo, then copy the contents of /public/* to the zacharysarah/zacharysarah.github.io repo and push changes as a new commit.
So I was able to solve it by renaming the existing public repo to something else (I went with “deprecated”), adding a custom domain to the private repo workflow, reconfiguring my DNS records, and re-triggering the build in the private repo.
The answer, as usual, was in the docs. Thanks for your help, @davidsneighbour, your questions prompted me to remember the DNS haiku:
It’s not DNS.
There’s no way it’s DNS.
It was DNS.