File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 9
9
contents : ' read'
10
10
id-token : ' write'
11
11
env :
12
+ # define Hugo cachedir so it is not version dependent
13
+ HUGO_CACHEDIR : /tmp/hugo_cache
12
14
IMAGE_NAME : ' lichturm-website'
13
15
IMAGE_TAG : ' prod'
14
16
runs-on : ' ubuntu-latest'
@@ -20,11 +22,23 @@ jobs:
20
22
with :
21
23
submodules : ' recursive'
22
24
23
- # https://github.com/jakejarvis/hugo-build-action
24
- - name : Build Website
25
- uses :
' jakejarvis/[email protected] '
25
+ # https://github.com/peaceiris/actions-hugo
26
+ - name : Setup Hugo
27
+ uses : peaceiris/actions-hugo@v3
28
+ with :
29
+ hugo-version : ' 0.131.0'
30
+
31
+ # cache the hugo output, so that only what has changed has to be regenerated
32
+ # https://github.com/actions/cache
33
+ - uses : actions/cache@v4
26
34
with :
27
- args : ' --minify'
35
+ path : ${{ env.HUGO_CACHEDIR }}
36
+ key : ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
37
+ restore-keys : |
38
+ ${{ runner.os }}-hugomod-
39
+
40
+ - name : Build Website
41
+ run : ' hugo --minify'
28
42
29
43
# so we can inspect what is being produced
30
44
# https://github.com/actions/upload-artifact
77
91
push : true
78
92
tags : ' ${{ secrets.CONTAINER_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}'
79
93
94
+ # once we are bored of building containers
80
95
# - name: Install s3cmd
81
96
# run: |
82
97
# pip install s3cmd
You can’t perform that action at this time.
0 commit comments