source
ブランチには hugo のコンテンツを置き、それらを Github Actions でブログに変換して、生成したものは master
ブランチに push する。
- GitHub Actions では GitHub Pages action · Actions · GitHub Marketplace を使用
.github/workflows/gh-pages.yml
は、GitHub Pages action · Actions · GitHub Marketplace を参考にした- TODO: わざわざ
master
ブランチを作らなくていいかも - Hugo Book | Hugo Themes を使用するために hugo
extended
を使用
git clone [email protected]:tk3/tk3.github.io.git
cd tk3.github.io/
:> README.md
git add README.md
git commit -m 'first commit'
git push origin master
git checkout -b source origin/master
git push origin source
cd ../
hugo_extended_0.68.3 new site hugo_tmp
cp -r hugo_tmp/* tk3.github.io/
cd tk3.github.io/
:> content/.gitkeep
:> data/.gitkeep
:> layouts/.gitkeep
:> static/.gitkeep
:> themes/.gitkeep
git add archetypes/default.md
git add config.toml
git add content/.gitkeep
git add data/.gitkeep
git add layouts/.gitkeep
git add static/.gitkeep
git add themes/.gitkeep
git commit -m 'add template files'
vi config.toml
git add config.toml
git commit -m 'modify config'
git submodule add https://github.com/alex-shpak/hugo-book themes/book
git commit -m 'add `book` theme'
mkdir -p .github/workflows/
:> .github/workflows/gh-pages.yml
vi .github/workflows/gh-pages.yml
git add .github/workflows/gh-pages.yml
git commit -m 'add config file for GitHub Actions'
git push origin HEAD