Build with the latest Hugo instead of a pinned release
Build and deploy the poweronoff.click hugo / build (push) Successful in 43s

Use ghcr.io/gohugoio/hugo:latest in CI and locally, so the site always builds
with the current Hugo release (currently v0.169.0). HUGO_IMAGE stays overridable
for debugging a version regression.

Trade-off: builds are no longer reproducible. If an upstream release breaks the
build, pin HUGO_IMAGE locally, then bump PaperMod with `make theme-update`.
This commit is contained in:
morpheus committed 2026-11-06 10:29:33 +01:00
1 parent b59b3bca78
commit c378349cff
3 files changed
+19 -9

No files matched your search

+3 -2
View File
@@ -21,12 +21,13 @@ jobs:
submodules: recursive submodules: recursive
# The image runs as a non-root user, so the mounted workspace must be # The image runs as a non-root user, so the mounted workspace must be
# writable. Keep HUGO_VERSION in sync with the Makefile. # writable. Same tag as the Makefile: `latest`, so site builds always use
# the newest Hugo. Pin a tag here only to debug a version regression.
- name: Prepare workspace - name: Prepare workspace
run: chmod -R a+rwX . run: chmod -R a+rwX .
- name: Build - name: Build
uses: docker://ghcr.io/gohugoio/hugo:v0.169.0 uses: docker://ghcr.io/gohugoio/hugo:latest
with: with:
args: --minify args: --minify
+11 -3
View File
@@ -11,9 +11,14 @@ leadership and engineering management by Stan Nowogrudski. Theme: PaperMod
## Commands ## Commands
Hugo is **not** installed on the host. Everything runs through the pinned Hugo is **not** installed on the host. Everything runs through the official
official Docker image (`HUGO_VERSION` in the `Makefile`, mirrored in Docker image `ghcr.io/gohugoio/hugo:latest`, in the `Makefile` and in
`.gitea/workflows/build.yml`). `.gitea/workflows/build.yml`. Builds track the newest Hugo; if a new release
breaks the site, pin for the debugging session instead of committing a tag:
```sh
make check HUGO_IMAGE=ghcr.io/gohugoio/hugo:v0.169.0
```
```sh ```sh
make build # production build into public/ (minified) make build # production build into public/ (minified)
@@ -91,5 +96,8 @@ Datenschutz/Impressum links now come from `params.footer.text` in `config.yml`.
- Two posts (`a-letter-to-my-younger-self`, `appreciation`) are drafts whose - Two posts (`a-letter-to-my-younger-self`, `appreciation`) are drafts whose
bodies are still placeholders. They are not published, but do not "clean bodies are still placeholders. They are not published, but do not "clean
them up" without asking — they are the author's unfinished work. them up" without asking — they are the author's unfinished work.
- Builds are intentionally unpinned (`hugo:latest`). A Hugo release can change
output or deprecate theme code between two commits; when that happens, pin via
`HUGO_IMAGE` locally, then bump PaperMod with `make theme-update`.
- Deploy still uses password auth; switch to an SSH key and keep the rsync - Deploy still uses password auth; switch to an SSH key and keep the rsync
`--delete` semantics. `--delete` semantics.
+5 -4
View File
@@ -1,10 +1,11 @@
# Local build helpers. The Hugo binary is not installed on the host: every # Local build helpers. The Hugo binary is not installed on the host: every
# target runs the pinned official image so local and CI builds match. # target runs the official Docker image, same tag as CI (`latest`).
# #
# Keep HUGO_VERSION in sync with the image tag in .gitea/workflows/build.yml. # `latest` moves without warning. To reproduce a build from an older point in
# time, override the image explicitly, e.g.:
# make check HUGO_IMAGE=ghcr.io/gohugoio/hugo:v0.169.0
HUGO_VERSION ?= 0.169.0 HUGO_IMAGE ?= ghcr.io/gohugoio/hugo:latest
HUGO_IMAGE ?= ghcr.io/gohugoio/hugo:v$(HUGO_VERSION)
# --user keeps public/ owned by you instead of root (CI works around this with chmod). # --user keeps public/ owned by you instead of root (CI works around this with chmod).
DOCKER_RUN = docker run --rm \ DOCKER_RUN = docker run --rm \
-u "$(shell id -u):$(shell id -g)" \ -u "$(shell id -u):$(shell id -g)" \