KevCaz's Website

The problem ❔

I am maintaining the website of the McCann Lab that is currently hosted on the GitHub Pages. Since I set up the custom domain, I was experiencing a weird issue: after every single deployment even on GitHub Pages (originally done by Travis, now by using a dedicated GitHub Actions workflow) the custom domain was removed and I had to rewrite it every time (see ⬇️) which was pretty annoying.

The solution 🏅

Truth be told, it was not difficult to find the solution! It was already reported several times (including this issue on GitHub gh-pages/issues/213). Basically, one needs to include a CNAME file with the custom domain name and for Hugo (the static site generator I use for this website), this file should be added in the static folder. This is actually well-explained in the documentation, so once again, read the doc!