File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,14 @@ jobs:
3030 runs-on : ubuntu-latest
3131 env :
3232 HUGO_VERSION : 0.145.0
33+ HUGO_CACHE_DIR : ${{ env.RUNNER_TEMP }}/hugo_cache
34+ HUGO_ENVIRONMENT : production
3335 steps :
34- - name : Install Hugo CLI
35- run : sudo snap install hugo --channel=extended
36-
37- - name : Install Dart Sass
38- run : sudo snap install dart-sass
36+ - name : Setup hugo
37+ uses : peaceiris/actions-hugo@v3
38+ with :
39+ hugo-version : ${{ env.HUGO_VERSION }}
40+ extended : true
3941
4042 - name : Install Node.js
4143 uses : actions/setup-node@v3
4749 id : pages
4850 uses : actions/configure-pages@v5
4951
52+ - name : Setup hugo cache
53+ uses : actions/cache@v4
54+ with :
55+ path : ${{ env.HUGO_CACHEDIR }}
56+ key : ${{ runner.os }}-hugomod-${{ hashFiles('**/config.toml') }}
57+ restore-keys : |
58+ ${{ runner.os }}-hugomod-
59+
5060 - name : Checkout
5161 uses : actions/checkout@v4
5262 with :
5666 - name : Build with Hugo
5767 env :
5868 # For maximum backward compatibility with Hugo modules
59- HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
60- HUGO_ENVIRONMENT : production
69+ HUGO_CACHEDIR : ${{ env.HUGO_CACHE_DIR }}
70+ HUGO_ENVIRONMENT : ${{ env.HUGO_ENVIRONMENT }}
6171 run : |
6272 hugo \
6373 --minify \
You can’t perform that action at this time.
0 commit comments