@@ -4,8 +4,7 @@ name: Deploy Hugo site to Pages
4
4
on :
5
5
# Runs on pushes targeting the default branch
6
6
push :
7
- branches :
8
- - main
7
+ branches : ["main"]
9
8
10
9
# Allows you to run this workflow manually from the Actions tab
11
10
workflow_dispatch :
@@ -32,34 +31,33 @@ jobs:
32
31
build :
33
32
runs-on : ubuntu-latest
34
33
env :
35
- HUGO_VERSION : 0.135.0
34
+ HUGO_VERSION : 0.132.2
36
35
steps :
37
- - name : Install Hugo CLI
38
- run : |
39
- wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40
- && sudo dpkg -i ${{ runner.temp }}/hugo.deb
41
- - name : Install Dart Sass
42
- run : sudo snap install dart-sass
43
36
- name : Checkout
44
37
uses : actions/checkout@v4
45
38
with :
39
+ fetch-depth : 0 # fetch all history for .GitInfo and .Lastmod
46
40
submodules : recursive
47
- fetch-depth : 0
41
+ - name : Setup Go
42
+ uses : actions/setup-go@v5
43
+ with :
44
+ go-version : ' 1.22'
48
45
- name : Setup Pages
49
46
id : pages
50
- uses : actions/configure-pages@v5
51
- - name : Install Node.js dependencies
52
- run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
47
+ uses : actions/configure-pages@v4
48
+ - name : Setup Hugo
49
+ run : |
50
+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
51
+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
53
52
- name : Build with Hugo
54
53
env :
55
- HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
54
+ # For maximum backward compatibility with Hugo modules
56
55
HUGO_ENVIRONMENT : production
57
- TZ : America/Los_Angeles
56
+ HUGO_ENV : production
58
57
run : |
59
58
hugo \
60
- --gc \
61
- --minify \
62
- --baseURL "${{ steps.pages.outputs.base_url }}/"
59
+ --gc --minify \
60
+ --baseURL "${{ steps.pages.outputs.base_url }}/"
63
61
- name : Upload artifact
64
62
uses : actions/upload-pages-artifact@v3
65
63
with :
75
73
steps :
76
74
- name : Deploy to GitHub Pages
77
75
id : deployment
78
- uses : actions/deploy-pages@v4
76
+ uses : actions/deploy-pages@v4
0 commit comments