Skip to content

Commit 629b40c

Browse files
Add test hugo build workflow
1 parent 8c1879b commit 629b40c

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: Install Hugo CLI
18+
run: |
19+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
20+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
21+
22+
- name: Install Dart Sass
23+
run: sudo snap install dart-sass
24+
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
fetch-depth: 0
30+
31+
- name: Install Node.js dependencies
32+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
33+
34+
- name: Build with Hugo
35+
run: hugo --minify

0 commit comments

Comments
 (0)