@@ -32,36 +32,51 @@ jobs:
32
32
build :
33
33
runs-on : ubuntu-latest
34
34
env :
35
- HUGO_VERSION : 0.112.7
35
+ HUGO_VERSION : 0.145.0
36
+ HUGO_ENVIRONMENT : production
37
+ TZ : America/Los_Angeles
36
38
steps :
37
39
- name : Install Hugo CLI
38
40
run : |
39
41
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40
42
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41
- - name : Install Dart Sass Embedded
42
- run : sudo snap install dart-sass-embedded
43
+ - name : Install Dart Sass
44
+ run : sudo snap install dart-sass
43
45
- name : Checkout
44
- uses : actions/checkout@v3
46
+ uses : actions/checkout@v4
45
47
with :
46
48
submodules : recursive
47
49
fetch-depth : 0
48
50
- name : Setup Pages
49
51
id : pages
50
- uses : actions/configure-pages@v3
52
+ uses : actions/configure-pages@v5
51
53
- name : Install Node.js dependencies
52
54
run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
55
+ - name : Cache Restore
56
+ id : cache-restore
57
+ uses : actions/cache/restore@v4
58
+ with :
59
+ path : |
60
+ ${{ runner.temp }}/hugo_cache
61
+ key : hugo-${{ github.run_id }}
62
+ restore-keys :
63
+ hugo-
53
64
- name : Build with Hugo
54
- env :
55
- # For maximum backward compatibility with Hugo modules
56
- HUGO_ENVIRONMENT : production
57
- HUGO_ENV : production
58
65
run : |
59
66
hugo \
60
67
--gc \
61
68
--minify \
62
- --baseURL "${{ steps.pages.outputs.base_url }}/"
69
+ --baseURL "${{ steps.pages.outputs.base_url }}/" \
70
+ --cacheDir "${{ runner.temp }}/hugo_cache"
71
+ - name : Cache Save
72
+ id : cache-save
73
+ uses : actions/cache/save@v4
74
+ with :
75
+ path : |
76
+ ${{ runner.temp }}/hugo_cache
77
+ key : ${{ steps.cache-restore.outputs.cache-primary-key }}
63
78
- name : Upload artifact
64
- uses : actions/upload-pages-artifact@v1
79
+ uses : actions/upload-pages-artifact@v3
65
80
with :
66
81
path : ./public
67
82
75
90
steps :
76
91
- name : Deploy to GitHub Pages
77
92
id : deployment
78
- uses : actions/deploy-pages@v2
93
+ uses : actions/deploy-pages@v4
0 commit comments