--- /dev/null
+name: Hugo
+
+on: push
+
+jobs:
+ gh-pages:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+ fetch-depth: 0
+
+ # https://github.com/marketplace/actions/github-pages-action
+ - name: Setup
+ uses: peaceiris/actions-hugo@v2
+ with:
+ hugo-version: '0.88.1'
+ extended: true
+
+ - name: Build
+ run: hugo --minify
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_branch: gh-pages
+ publish_dir: ./public
--- /dev/null
+[submodule "blog/themes/smigle"]
+ path = blog/themes/smigle
+ url = https://gitlab.com/ian-s-mcb/smigle-hugo-theme.git
--- /dev/null
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
+
--- /dev/null
+baseURL = 'http://example.org/'
+languageCode = 'ja-JP'
+title = 'ハヤオのブログ'
+theme = "smigle"
--- /dev/null
+---
+title: "最初の投稿"
+date: 2021-10-09T21:10:53+09:00
+draft: true
+---
+
+ハヤオのブログをHugoを使って作ってみた。
+
+マークダウンだけでこうやってかけるのシンプルでいいですね。
+
+Fascodeのブログに載せられないものでもこれからちょこちょこ書いていこうかしら()
--- /dev/null
+Subproject commit 13c241e8ab83a0162d7c3e3eaefaadb0843bf38d
--- /dev/null
+#!/usr/bin/env bash
+
+set -eu
+
+script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
+theme_dir="${script_path}/themes/"
+
+cd "${theme_dir}"
+for _theme in "${theme_dir}/"*; do
+ cd "${_theme}"
+ current_commit_id="$(git rev-parse --short HEAD)"
+ default_branch="$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')"
+ git checkout "${default_branch}"
+ git pull
+ new_commit_id="$(git rev-parse --short HEAD)"
+ cd "${script_path}"
+
+
+ if [[ ! "${current_commit_id}" = "${new_commit_id}" ]]; then
+ git add "${_theme}"
+ git commit -S -m "Updated hugo theme (${new_commit_id})"
+ fi
+
+ git push
+done