ObsidianでHugo用ノートを更新したら自動で公開するようにしている。 その中でGitHubActionを利用しているがエラーがでて動かなくなったので修正案を試してみる。
エラー
Error: Error building site: TOCSS: failed to transform “main_parsed.scss” (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to ‘libsass’.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
どうやらHugoのインストールに失敗しているとのことで、拡張版が必要とのことらしい。
現在のGitHubActionに記述している内容は
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest' # 最新verを使用する
解決方法
Hugo setup · Actions · GitHub Marketplace · GitHubによればextended: true
と記述すればいいらしい
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest' # 最新verを使用する
extended: true # 拡張版を使用する
これでエラーがなくActionが実行されれば解決。
結果
今回はこの方法で解決できた。
よって、github/workflows/netlify.yml
へ追記したものを最新版とする。