-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support: Actions/cache for Hugo modules with Hugo v0.127.0 #1081
Comments
Oh, okay, finally found the right way to do it. name: GitHub Pages
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.127.0
HUGO_CACHEDIR: /tmp/hugo_cache
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
- uses: actions/cache@v4
with:
path: ${{ env.HUGO_CACHEDIR }}
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public |
Looks good 👍 Hugo can define its cache directory by |
I think the documentation snippet (from the |
I agree! Could you open your PR to fix the section on https://github.com/peaceiris/actions-hugo? |
At your service 🧡 |
Checklist
Describe your question
Hello!
I'm running on Hugo v0.127.0
And I'm also using a Hugo module (Blowfish).
From the docs of this GitHub Action:
But, I've checked both folders in my CI, and don't find any of them.
I've even fired a ls -R /home/runner/
And a ls -R .
And I don't find any "hugo_cache"
It's weird, since I'm not using the --gc flag at the build of my Hugo website.
I did everything exactly as it is documented.
Also, this is quite annoying, because the download of the module is likely 78% of the duration of my CI/CD...
Also:
And
ls /tmp
gives:There is a hugo_cache_runner here, but it seems to be pointless in this context...
Any clue?
Relevant links
Relevant log output
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: