Skip to content

Commit 349c2a1

Browse files
authored
Fix website labels and build metadata
Updates website labels, links, and title text. Adds static build metadata to the production image and keeps size checks independent from the README badge.
1 parent ebf8e6f commit 349c2a1

12 files changed

Lines changed: 162 additions & 26 deletions

File tree

‎.github/badges/master-payload-size.json‎

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

‎.github/workflows/docker-publish.yml‎

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ jobs:
4444
echo "IMAGE=${REGISTRY}/${OWNER}/${IMAGE_NAME}" >> "$GITHUB_ENV"
4545
echo "Image namespace: ${REGISTRY}/${OWNER}/${IMAGE_NAME}"
4646
47+
- name: Compute build info
48+
id: build_info
49+
run: |
50+
{
51+
echo "created=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
52+
echo "source=https://github.com/${GITHUB_REPOSITORY}"
53+
echo "branch=${GITHUB_REF_NAME}"
54+
echo "run_url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
55+
echo "author<<EOF"
56+
git log -1 --format='%an <%ae>'
57+
echo "EOF"
58+
} >> "$GITHUB_OUTPUT"
59+
4760
- name: Docker metadata
4861
id: meta
4962
uses: docker/metadata-action@v6
@@ -68,6 +81,17 @@ jobs:
6881
${{ env.IMAGE }}:ci
6982
${{ steps.meta.outputs.tags }}
7083
labels: ${{ steps.meta.outputs.labels }}
84+
build-args: |
85+
BUILD_DATE=${{ steps.build_info.outputs.created }}
86+
VCS_REF=${{ github.sha }}
87+
VCS_URL=${{ steps.build_info.outputs.source }}
88+
SOURCE_BRANCH=${{ steps.build_info.outputs.branch }}
89+
IMAGE_NAME=${{ env.IMAGE }}
90+
GITHUB_RUN_ID=${{ github.run_id }}
91+
GITHUB_RUN_ATTEMPT=${{ github.run_attempt }}
92+
GITHUB_RUN_URL=${{ steps.build_info.outputs.run_url }}
93+
GITHUB_ACTOR=${{ github.actor }}
94+
COMMIT_AUTHOR=${{ steps.build_info.outputs.author }}
7195
cache-from: type=gha
7296
cache-to: type=gha,mode=max,ignore-error=true
7397
@@ -124,6 +148,19 @@ jobs:
124148
echo "IMAGE=${REGISTRY}/${OWNER}/${IMAGE_NAME}" >> "$GITHUB_ENV"
125149
echo "Image namespace: ${REGISTRY}/${OWNER}/${IMAGE_NAME}"
126150
151+
- name: Compute build info
152+
id: build_info
153+
run: |
154+
{
155+
echo "created=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
156+
echo "source=https://github.com/${GITHUB_REPOSITORY}"
157+
echo "branch=${GITHUB_REF_NAME}"
158+
echo "run_url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
159+
echo "author<<EOF"
160+
git log -1 --format='%an <%ae>'
161+
echo "EOF"
162+
} >> "$GITHUB_OUTPUT"
163+
127164
- name: Docker metadata
128165
id: meta
129166
uses: docker/metadata-action@v6
@@ -165,5 +202,67 @@ jobs:
165202
push: true
166203
tags: ${{ steps.meta.outputs.tags }}
167204
labels: ${{ steps.meta.outputs.labels }}
205+
build-args: |
206+
BUILD_DATE=${{ steps.build_info.outputs.created }}
207+
VCS_REF=${{ github.sha }}
208+
VCS_URL=${{ steps.build_info.outputs.source }}
209+
SOURCE_BRANCH=${{ steps.build_info.outputs.branch }}
210+
IMAGE_NAME=${{ env.IMAGE }}
211+
GITHUB_RUN_ID=${{ github.run_id }}
212+
GITHUB_RUN_ATTEMPT=${{ github.run_attempt }}
213+
GITHUB_RUN_URL=${{ steps.build_info.outputs.run_url }}
214+
GITHUB_ACTOR=${{ github.actor }}
215+
COMMIT_AUTHOR=${{ steps.build_info.outputs.author }}
168216
cache-from: type=gha
169217
cache-to: type=gha,mode=max,ignore-error=true
218+
219+
update-size-badge:
220+
needs: build
221+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
222+
runs-on: ubuntu-latest
223+
continue-on-error: true
224+
permissions:
225+
contents: write
226+
227+
steps:
228+
- name: Configure Git default branch
229+
run: git config --global init.defaultBranch master
230+
231+
- name: Checkout
232+
uses: actions/checkout@v6
233+
with:
234+
fetch-depth: 0
235+
236+
- name: Generate badge data
237+
run: BADGE_PATH=tmp/master-payload-size.json bash scripts/update-size-badge.sh
238+
239+
- name: Publish badge data
240+
run: |
241+
set -euo pipefail
242+
badge_branch="size-badge-data"
243+
badge_file="tmp/master-payload-size.json"
244+
worktree="$(mktemp -d)"
245+
246+
git config user.name "github-actions[bot]"
247+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
248+
249+
if git ls-remote --exit-code --heads origin "$badge_branch" >/dev/null 2>&1; then
250+
git fetch origin "$badge_branch"
251+
git worktree add "$worktree" "origin/$badge_branch"
252+
git -C "$worktree" switch -c "$badge_branch"
253+
else
254+
git worktree add --detach "$worktree"
255+
git -C "$worktree" switch --orphan "$badge_branch"
256+
git -C "$worktree" rm -rf . >/dev/null 2>&1 || true
257+
fi
258+
259+
cp "$badge_file" "$worktree/master-payload-size.json"
260+
git -C "$worktree" add master-payload-size.json
261+
262+
if git -C "$worktree" diff --cached --quiet; then
263+
echo "Badge data unchanged"
264+
exit 0
265+
fi
266+
267+
git -C "$worktree" commit -m "Update master payload badge"
268+
git -C "$worktree" push origin "HEAD:$badge_branch"

‎Caddyfile.site‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
root * /srv
33
encode zstd gzip
44
respond /healthz 200
5+
header /build-info.json Cache-Control "no-store"
56
header /_next/static/* Cache-Control "public, max-age=31536000, immutable"
67
header /optimized/* Cache-Control "public, max-age=604800"
78
header /partners/* Cache-Control "public, max-age=604800"

‎Dockerfile‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,50 @@ RUN npm run build
1616
FROM caddy:2.9-alpine AS runner
1717
WORKDIR /srv
1818

19+
ARG BUILD_DATE="unknown"
20+
ARG VCS_REF="unknown"
21+
ARG VCS_URL="https://github.com/Devsh-Graphics-Programming/MainWebsite"
22+
ARG SOURCE_BRANCH="unknown"
23+
ARG IMAGE_NAME="www-website"
24+
ARG GITHUB_RUN_ID="unknown"
25+
ARG GITHUB_RUN_ATTEMPT="unknown"
26+
ARG GITHUB_RUN_URL="unknown"
27+
ARG GITHUB_ACTOR="unknown"
28+
ARG COMMIT_AUTHOR="unknown"
29+
30+
LABEL org.opencontainers.image.title="DevSH Graphics Programming Website" \
31+
org.opencontainers.image.description="Static DevSH website served by Caddy" \
32+
org.opencontainers.image.url="https://www.devsh.eu" \
33+
org.opencontainers.image.source="${VCS_URL}" \
34+
org.opencontainers.image.revision="${VCS_REF}" \
35+
org.opencontainers.image.created="${BUILD_DATE}" \
36+
org.opencontainers.image.authors="${COMMIT_AUTHOR}"
37+
1938
RUN addgroup -S caddy && adduser -S caddy -G caddy
2039

2140
COPY --from=build --chown=caddy:caddy /app/out ./
2241
COPY --chown=caddy:caddy Caddyfile.site /etc/caddy/Caddyfile
2342

43+
RUN set -eu; \
44+
json_escape() { printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g'; }; \
45+
{ \
46+
printf '{\n'; \
47+
printf ' "schemaVersion": 1,\n'; \
48+
printf ' "image": "%s",\n' "$(json_escape "$IMAGE_NAME")"; \
49+
printf ' "source": "%s",\n' "$(json_escape "$VCS_URL")"; \
50+
printf ' "revision": "%s",\n' "$(json_escape "$VCS_REF")"; \
51+
printf ' "branch": "%s",\n' "$(json_escape "$SOURCE_BRANCH")"; \
52+
printf ' "created": "%s",\n' "$(json_escape "$BUILD_DATE")"; \
53+
printf ' "commitAuthor": "%s",\n' "$(json_escape "$COMMIT_AUTHOR")"; \
54+
printf ' "builder": {\n'; \
55+
printf ' "actor": "%s",\n' "$(json_escape "$GITHUB_ACTOR")"; \
56+
printf ' "runId": "%s",\n' "$(json_escape "$GITHUB_RUN_ID")"; \
57+
printf ' "runAttempt": "%s",\n' "$(json_escape "$GITHUB_RUN_ATTEMPT")"; \
58+
printf ' "runUrl": "%s"\n' "$(json_escape "$GITHUB_RUN_URL")"; \
59+
printf ' }\n'; \
60+
printf '}\n'; \
61+
} > /srv/build-info.json
62+
2463
EXPOSE 3000
2564
USER caddy
2665
ENTRYPOINT ["caddy", "run", "--config=/etc/caddy/Caddyfile"]

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img src="https://github.com/Devsh-Graphics-Programming/MainWebsite/actions/workflows/docker-publish.yml/badge.svg?branch=master" alt="Build Status" />
44
</a>
55
<a href="https://github.com/Devsh-Graphics-Programming/MainWebsite">
6-
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FDevsh-Graphics-Programming%2FMainWebsite%2Fmaster%2F.github%2Fbadges%2Fmaster-payload-size.json" alt="Master payload size" />
6+
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FDevsh-Graphics-Programming%2FMainWebsite%2Fsize-badge-data%2Fmaster-payload-size.json" alt="Master payload size" />
77
</a>
88
<a href="https://discord.gg/krsBcABm7u">
99
<img src="https://img.shields.io/discord/308323056592486420?label=discord&logo=discord&logoColor=white&color=7289DA" alt="Join our Discord" />
@@ -24,7 +24,7 @@ This repo is a Next.js app used to generate a static site. The final production
2424
2525
## Repository size budget
2626
- CI fails if the tracked tree exceeds `10 MiB`, `public/` exceeds `8 MiB`, any tracked blob exceeds `1 MiB`, or HEAD Git blob payloads exceed `15 MiB`.
27-
- Run `scripts/check-size-budget.sh` locally before adding new media. If the badge changes, commit the updated `.github/badges/master-payload-size.json`.
27+
- Run `scripts/check-size-budget.sh` locally before adding new media. The README badge is informational and is updated outside the size gate.
2828

2929
## Runtime filesystem layout
3030
- The image is read-only, but Caddy still needs tiny writable slots for TLS cache/autosave/lock files.

‎app/components/Footer.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ export default function footer() {
44
return (
55
<div className="flex flex-col items-center justify-center p-1 border-t border-t-[#181818]">
66
<GP_Links/>
7+
<a
8+
href="/build-info.json"
9+
className="pb-1 text-[10px] leading-none text-neutral-700 transition-colors hover:text-neutral-500"
10+
>
11+
build info
12+
</a>
713
</div>
814
)
9-
}
15+
}

‎app/components/Partners.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export type Partner = {
1212
const partners: Partner[] = [
1313
{ name: "Applications in CADD", initials: "AC", logo: "/partners/appscadd.png", url: "https://appsincadd.co.uk/" },
1414
{ name: "Synera", initials: "SY", logo: "/partners/synera.png", url: "https://www.synera.io/", logoTone: "invert" },
15-
{ name: "Ditt", initials: "DT", logo: "/partners/ditt.png", url: "https://www.ditt.nl/" },
16-
{ name: "Imverse", initials: "IM", logo: "/partners/imverse.png", url: "https://www.imverse.ch/" },
15+
{ name: "Ditt Officemakers", initials: "DT", logo: "/partners/ditt.png", url: "https://www.ditt.nl/" },
16+
{ name: "Imverse", initials: "IM", logo: "/partners/imverse.png", url: "https://www.imverse.com/" },
1717
{ name: "Wild Software Inc", initials: "WI", logo: "/partners/wild.jpg", url: "https://factionsvr.com/" },
1818
{ name: "RELEX Solutions", initials: "RX", logo: null, url: "https://relexsolutions.com/" },
1919
];

‎app/components/ProjectsSection.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Project = {
2525
const projects: Project[] = [
2626
{
2727
slug: "ditt",
28-
company: "Ditt",
28+
company: "Ditt Officemakers",
2929
url: "https://www.ditt.nl/",
3030
title: "Interactive GPU Path Tracer",
3131
summary: "Real-time and offline rendering work for interior design workflows using OpenCL, OptiX, Mitsuba and Vulkan.",
@@ -87,7 +87,7 @@ const projects: Project[] = [
8787
{
8888
slug: "imverse",
8989
company: "Imverse",
90-
url: "https://www.imverse.ch/",
90+
url: "https://www.imverse.com/",
9191
title: "GPGPU Computer Vision",
9292
summary: "Computer vision acceleration work for real-time volumetric capture and RGB+D processing.",
9393
bullets: [

‎app/components/TestimonialsSection.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const testimonials: Testimonial[] = [
2222
},
2323
{
2424
name: "Yoran Bosman",
25-
role: "Senior Software Architect",
25+
role: "Partner & Software Architect",
2626
profilePicture: "/testimonials/yoran.jpg",
2727
companyIcon: "/partners/ditt.png",
2828
testimonial:

‎app/services/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default function Page() {
118118
</Paragraph>
119119
<ul className="list-disc pl-5 mt-4 flex flex-col gap-2">
120120
<li><strong>Graphics &amp; Compute APIs:</strong> Vulkan, DirectX 12, DirectX 11, CUDA, OpenCL, WebGPU, OpenGL (including ES &amp; WebGL), NVN, SYCL.</li>
121-
<li><strong>Shading &amp; Architecture:</strong> SPIR-V, HLSL 202x, Slang, GLSL and WHSL.</li>
121+
<li><strong>Shading &amp; Architecture:</strong> SPIR-V, HLSL 202x, Slang, GLSL and WGSL.</li>
122122
<li><strong>Build Systems:</strong> CMake, Conan, Python, SWIG, MCJIT, ORCJIT, Clang Customizations, LLVM Toolchains.</li>
123123
<li><strong>Infrastructure, CI/CD &amp; Tooling:</strong> Docker, Jenkins, Kubernetes, Terraform, AWS, Proxmox, vGPUs, virGL, venus, virtIO, QEMU.</li>
124124
<li><strong>Delivering Web Experiences:</strong> WASM, Emscripten, TypeScript, .NET 7, Venus-Protocol, ChromeOS native APK development.</li>

0 commit comments

Comments
 (0)