Skip to content

Commit 531c864

Browse files
Add test hugo build workflow
1 parent 8c1879b commit 531c864

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/test-hugo-build.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test Hugo Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
env:
15+
HUGO_VERSION: 0.128.0
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install Hugo CLI
21+
run: |
22+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
23+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
24+
25+
- name: Install Dart Sass
26+
run: sudo snap install dart-sass
27+
28+
- name: Install Node.js dependencies
29+
run: |
30+
if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
31+
npm ci
32+
fi
33+
34+
- name: Build with Hugo
35+
run: hugo --minify

0 commit comments

Comments
 (0)