Skip to content

Commit 258edaa

Browse files
committed
Tooling: Add hugo exampleSite build to CI
This will use the latest version of `go` and `hugo` to force any breaks to happen as early as possible.
1 parent 3bc0273 commit 258edaa

File tree

4 files changed

+44
-7
lines changed

4 files changed

+44
-7
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Hugo Build Test
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
10+
steps:
11+
- name: Checkout docs content
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.7.1
13+
with:
14+
fetch-depth: 0 # This is required for hugo Lastmod to function properly
15+
16+
### Hugo builds
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
20+
with:
21+
go-version: 'latest'
22+
23+
- name: Setup Hugo
24+
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
25+
with:
26+
hugo-version: 'latest'
27+
extended: true
28+
29+
- name: Build Hugo
30+
run: |
31+
make build-example-site

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ list help::
88
@echo "<COMMON>"
99
@echo " list | help: Print these available make targets"
1010
@echo "<LINTING AND FORMATTING>"
11-
@echo " biome-format: Runs the biome formatter."
12-
@echo " biome-lint: Runs the biome linter."
13-
@echo " biome-all: Runs both the lint and formatting commands."
11+
@echo " biome-format: Runs the biome formatter."
12+
@echo " biome-lint: Runs the biome linter."
13+
@echo " biome-all: Runs both the lint and formatting commands."
14+
@echo "build-example-site: Builds hugo exampleSite."
1415
@echo " (Set BIOME_ARGS to add additional arguments to biome command (ex: make biome-all BIOME_ARGS=write))"
1516

16-
.PHONY: biome-format biome-lint biome-all setup-pre-commit
17+
.PHONY: biome-format biome-lint biome-all setup-pre-commit build-example-site
1718
BIOME_ARGS ?=
1819
FLAG :=
1920
ifeq ($(BIOME_ARGS), write)
@@ -36,3 +37,6 @@ setup-pre-commit:
3637
pre-commit install --hook-type commit-msg; \
3738
echo "pre-commit hooks have been successfully installed."; \
3839
fi
40+
41+
build-example-site:
42+
cd exampleSite && hugo mod get && hugo build --gc -e production

biome.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"**/coveo.css",
2323
"**/f5-hugo.css",
2424
"**/highlight.css",
25-
"**/*-overrides.css"
25+
"**/*-overrides.css",
26+
27+
"exampleSite"
2628
]
2729
},
2830
"formatter": {

exampleSite/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module github.com/nginxinc/docs
22

3-
go 1.19
3+
go 1.23
44

5-
require github.com/nginxinc/nginx-hugo-theme v0.41.22 // indirect
5+
require github.com/nginxinc/nginx-hugo-theme v0.41.27 // indirect
66

77
replace github.com/nginxinc/nginx-hugo-theme => ../

0 commit comments

Comments
 (0)