@@ -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 :
@@ -31,33 +32,34 @@ jobs:
31
32
build :
32
33
runs-on : ubuntu-latest
33
34
env :
34
- HUGO_VERSION : 0.124.1
35
+ HUGO_VERSION : 0.124.0
35
36
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
36
43
- name : Checkout
37
44
uses : actions/checkout@v4
38
45
with :
39
- fetch-depth : 0 # fetch all history for .GitInfo and .Lastmod
40
46
submodules : recursive
41
- - name : Setup Go
42
- uses : actions/setup-go@v5
43
- with :
44
- go-version : ' 1.22'
47
+ fetch-depth : 0
45
48
- name : Setup Pages
46
49
id : pages
47
50
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
51
+ - name : Install Node.js dependencies
52
+ run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
52
53
- name : Build with Hugo
53
54
env :
54
55
# For maximum backward compatibility with Hugo modules
55
56
HUGO_ENVIRONMENT : production
56
57
HUGO_ENV : production
57
58
run : |
58
59
hugo \
59
- --gc --minify \
60
- --baseURL "${{ steps.pages.outputs.base_url }}/"
60
+ --gc \
61
+ --minify \
62
+ --baseURL "${{ steps.pages.outputs.base_url }}/"
61
63
- name : Upload artifact
62
64
uses : actions/upload-pages-artifact@v3
63
65
with :
73
75
steps :
74
76
- name : Deploy to GitHub Pages
75
77
id : deployment
76
- uses : actions/deploy-pages@v4
78
+ uses : actions/deploy-pages@v4
0 commit comments