Github PageでGithub Actionsを利用したビルド・デプロイ時にうまく自前のドメインを反映できない問題 #
事象 #
具体的に↓のようになる。
github pagesの設置欄のCustom domain
項目を修正。
- [
$username
].github.io → xxx.com等に変更 - Github Actions を利用しbuild, deployしたら、もとの[
$username
].github.ioに戻ってしまう。
解決手法 #
hugoのディレクトリ内に、static/CNAME
ファイルを作成する必要がある模様。
参考 #
https://gohugo.io/hosting-and-deployment/hosting-on-github/#use-a-custom-domain