peaceiris/actions-hugo

support: hugo uses the `_gen` to build site

wukyu opened this issue · 4 comments

wukyu commented

Checklist

  • I am using the latest version of this aciton.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

There is a resources/_gen/assets/scss/scss in the root directory of my site's theme. and the Action seems to use it for building the site. but that doesn't occurs in my local PC with hugo hugo --minify or hufo server -D.

that causes some bugs of the final style sheets. because the resources/_gen is produced during the theme developer compiling his/her project last time, and may be different from the latest source code from the theme.

Relevant links

Public repository:https://github.com/narisuzu/narisuzu.github.io/
YAML workflow:https://github.com/narisuzu/narisuzu.github.io/blob/main/.github/workflows/main.yml

Relevant log output

https://pipelines.actions.githubusercontent.com/I0rS2jsNgO60qqGESKDLwqgacuCMXt3wP81BdXxN6K66Z1pEzg/_apis/pipelines/1/runs/2/signedlogcontent/3?urlExpires=2021-07-26T05%3A37%3A55.0479244Z&urlSigningMethod=HMACV1&urlSignature=nPhu9pl0NwTKkt7%2BXEjLlXnwKFJofJb4QA4zattiNeo%3D

Additional context.

is there a way to fix it?

You need a Hguo extended version to build your project with the theme. Please use a Hugo extended on the GitHub Actions runner and your local machine.

See more: Install Hugo | Hugo

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: '0.86.0'
+         extended: true

Thanks, I gonna have a try

Get solved!
💖
I apologize for disturbing.

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.