@@ -4,7 +4,8 @@ name: Deploy Hugo site to Pages
4
4
on :
5
5
# Runs on pushes targeting the default branch
6
6
push :
7
- branches : ["main"]
7
+ branches :
8
+ - main
8
9
9
10
# Allows you to run this workflow manually from the Actions tab
10
11
workflow_dispatch :
@@ -15,10 +16,11 @@ permissions:
15
16
pages : write
16
17
id-token : write
17
18
18
- # Allow one concurrent deployment
19
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19
21
concurrency :
20
22
group : " pages"
21
- cancel-in-progress : true
23
+ cancel-in-progress : false
22
24
23
25
# Default to bash
24
26
defaults :
@@ -30,34 +32,36 @@ jobs:
30
32
build :
31
33
runs-on : ubuntu-latest
32
34
env :
33
- HUGO_VERSION : 0.108 .0
35
+ HUGO_VERSION : 0.128 .0
34
36
steps :
35
37
- name : Install Hugo CLI
36
38
run : |
37
39
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
38
- && sudo dpkg -i ${{ runner.temp }}/hugo.deb
39
- - name : Install Dart Sass Embedded
40
- run : sudo snap install dart-sass-embedded
40
+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
41
+ - name : Install Dart Sass
42
+ run : sudo snap install dart-sass
41
43
- name : Checkout
42
- uses : actions/checkout@v3
44
+ uses : actions/checkout@v4
43
45
with :
44
46
submodules : recursive
47
+ fetch-depth : 0
45
48
- name : Setup Pages
46
49
id : pages
47
- uses : actions/configure-pages@v3
50
+ uses : actions/configure-pages@v5
48
51
- name : Install Node.js dependencies
49
52
run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
50
53
- name : Build with Hugo
51
54
env :
52
- # For maximum backward compatibility with Hugo modules
55
+ HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
53
56
HUGO_ENVIRONMENT : production
54
- HUGO_ENV : production
57
+ TZ : America/Los_Angeles
55
58
run : |
56
59
hugo \
60
+ --gc \
57
61
--minify \
58
- --baseURL "${{ steps.pages.outputs.base_url }}/"
62
+ --baseURL "${{ steps.pages.outputs.base_url }}/"
59
63
- name : Upload artifact
60
- uses : actions/upload-pages-artifact@v1
64
+ uses : actions/upload-pages-artifact@v3
61
65
with :
62
66
path : ./public
63
67
71
75
steps :
72
76
- name : Deploy to GitHub Pages
73
77
id : deployment
74
- uses : actions/deploy-pages@v1
78
+ uses : actions/deploy-pages@v4
79
+
0 commit comments