Skip to content

Commit 22843cf

Browse files
authored
Merge pull request #414 from VirtualFlyBrain/feature/vfb-nova-theme
Feature/vfb nova theme
2 parents a3b436b + bec0567 commit 22843cf

111 files changed

Lines changed: 3617 additions & 726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# NOT ACTIVE where it sits. Move it into place to enable:
2+
# git mv themes/vfb-nova/ci/builder-image.yml .github/workflows/builder-image.yml
3+
# Parked here because the token used to push this branch has no `workflow`
4+
# scope, and GitHub rejects any push touching .github/workflows/ without it.
5+
# Pushing from a checkout with normal credentials has no such problem.
6+
#
7+
# Until it is moved, virtualflybrain/vfb-static-builder DOES NOT EXIST and the
8+
# Rancher service has nothing to pull. This has to happen before the switchover.
9+
#
10+
# Publishes the image the Rancher build service runs. It lives here, next to
11+
# deploy.sh, because deploy.sh is what dictates the image's contents — bash,
12+
# rsync and findutils are in the Dockerfile for its sake. Splitting the two
13+
# across repos is how rcourt/docsy-builder:Feb2023 ended up frozen on a floating
14+
# base tag for two years.
15+
#
16+
# Uses the org-level Docker Hub secrets (DOCKER_HUB_USER / DOCKER_HUB_PASSWORD),
17+
# which vfb-status and vfbquery already use to publish into the virtualflybrain
18+
# namespace. Docker Hub creates the repository on first push.
19+
name: builder image
20+
21+
on:
22+
push:
23+
branches: ["master"]
24+
paths:
25+
- "Dockerfile"
26+
- "deploy.sh"
27+
- ".github/workflows/builder-image.yml"
28+
release:
29+
types: [published]
30+
workflow_dispatch:
31+
32+
permissions:
33+
contents: read
34+
35+
jobs:
36+
publish:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- uses: docker/setup-buildx-action@v3
42+
43+
- name: Log in to Docker Hub
44+
uses: docker/login-action@v3
45+
with:
46+
username: ${{ secrets.DOCKER_HUB_USER }}
47+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
48+
49+
- name: Metadata
50+
id: meta
51+
uses: docker/metadata-action@v5
52+
with:
53+
images: virtualflybrain/vfb-static-builder
54+
tags: |
55+
type=raw,value=latest,enable={{is_default_branch}}
56+
type=ref,event=tag
57+
type=sha,format=short
58+
59+
- name: Build and push
60+
uses: docker/build-push-action@v6
61+
with:
62+
context: .
63+
push: true
64+
tags: ${{ steps.meta.outputs.tags }}
65+
labels: ${{ steps.meta.outputs.labels }}
66+
67+
# Tests the first tag this run actually pushed. The previous version
68+
# tested :latest, which metadata-action only emits on the default branch,
69+
# so a tag-triggered run would have failed on an image that did not exist.
70+
#
71+
# Pin the Rancher service to the sha- tag printed at the end, not :latest.
72+
- name: Smoke test the published image
73+
env:
74+
TAGS: ${{ steps.meta.outputs.tags }}
75+
run: |
76+
set -euo pipefail
77+
image=$(printf '%s\n' "$TAGS" | head -n1)
78+
echo "testing $image"
79+
docker run --rm --entrypoint hugo "$image" version
80+
docker run --rm --entrypoint /bin/sh "$image" -c '
81+
set -e
82+
command -v bash
83+
command -v rsync
84+
command -v find
85+
test "$HUGO_CACHEDIR" = /tmp/hugo_cache
86+
test "$(pwd)" = /src
87+
test "$(id -u)" = 0
88+
'
89+
echo "pushed tags:"
90+
printf '%s\n' "$TAGS"

‎.gitmodules‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎Dockerfile‎

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
1-
FROM klakegg/hugo:ext-alpine
1+
# Build image for the static site.
2+
#
3+
# docker build -t vfb-static-builder .
4+
# docker run --rm -v "$PWD:/src" -v vfb_cache:/tmp vfb-static-builder
5+
#
6+
# v0.164.0 is the newest stable Hugo (released 2026-07-06) and the site builds
7+
# clean on it: 186 pages, no WARN, no ERROR. Pinned rather than :latest so
8+
# rebuilding this image cannot silently change the site.
9+
#
10+
# The theme's declared minimum is 0.128.0 (`[pagination] pagerSize`). It does
11+
# also build on 0.122.0, which is what rcourt/docsy-builder:Feb2023 carries, but
12+
# that image has no rsync and warns about the declared minimum.
13+
#
14+
# Base is Alpine 3.22, so apk is correct. The upstream image already carries
15+
# git, Node, npm and Dart Sass. This site needs none of them — the theme ships
16+
# plain CSS concatenated by Hugo, so even the extended edition is optional — but
17+
# they come with the official image and are not worth stripping out.
18+
#
19+
# bash and rsync are for deploy.sh, which stages the build and syncs it into the
20+
# served directory rather than writing there directly. findutils replaces
21+
# busybox find so the page-count gate behaves predictably.
22+
FROM ghcr.io/gohugoio/hugo:v0.164.0
223

3-
RUN apk add git && \
4-
git config --global --add safe.directory /src
24+
# Deliberately root, unlike the upstream image's hugo:hugo. The published tree
25+
# on the NFS volume is owned by root from the klakegg-era builds, so an
26+
# unprivileged rsync could not overwrite it.
27+
USER root
28+
RUN apk add --no-cache bash rsync findutils
29+
30+
# The upstream image sets HUGO_CACHEDIR=/cache and WORKDIR /project. Both are
31+
# wrong here and neither can be left to deploy.sh's defaults: the script uses
32+
# ${HUGO_CACHEDIR:-/tmp/hugo_cache}, which never fires while the image has the
33+
# variable set, so the cache would land in the container's writable layer
34+
# instead of the volume mounted at /tmp — discarded every run, and growing host
35+
# disk in between. Rancher mounts the workspace at /src and the cache at /tmp.
36+
ENV HUGO_CACHEDIR=/tmp/hugo_cache
37+
WORKDIR /src
38+
39+
ENTRYPOINT []
40+
CMD ["/bin/bash", "/src/deploy.sh"]

‎assets/scss/_styles_project.scss‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎assets/scss/_variables_project.scss‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)