GitHub Pages resets custom domain for deployment every time I push to gh-pages #22366
-
I have a fairly simple static website pipeline with Hugo. The Here’s what my Workflow looks like.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Nevermind, I didn’t realize publishing to a custom domain through the settings is just commiting CNAME to gh-pages branch and since I didn’t have static/CNAME in my main branch for Hugo generator, this would be lost after each deployment to gh-pages. |
Beta Was this translation helpful? Give feedback.
-
Please add the CNAME file to the public folder. The contents of the CNAME file are your domain name. |
Beta Was this translation helpful? Give feedback.
Nevermind, I didn’t realize publishing to a custom domain through the settings is just commiting CNAME to gh-pages branch and since I didn’t have static/CNAME in my main branch for Hugo generator, this would be lost after each deployment to gh-pages.