Skip to content

Commit a60d7eb

Browse files
ryan-williamsclaude
andcommitted
www.yml: regenerate og:image mosaic in CI
`compose-og.sh` (stations map + 2 plots → 1200×630 `ctbk-og-mosaic.jpg`, the `og:image` since `f0545db2`) was manual-only — the shipped mosaic was 4 months stale while its source screenshots regenerated on every deploy. Run it in www.yml right after the screenshot step; exclude it from the change-gate (like `ctbk-stations`, whose per-run map-render variance would re-trigger the commit-back loop forever) so it ships whenever a plot screenshot actually changes — i.e. every data-driven deploy, ≈monthly. `compose-og.sh` gains a `magick`/`convert` shim (GHA ubuntu runners have ImageMagick 6). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e6d31f8 commit a60d7eb

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/www.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,20 @@ jobs:
5757
with:
5858
name: screenshots
5959
path: www/public/screenshots/
60+
- name: Compose og:image mosaic
61+
working-directory: www
62+
# Recomposes `ctbk-og-mosaic.jpg` from the just-regenerated
63+
# screenshots (map + 2 plots). Excluded from the change-gate below
64+
# (like `ctbk-stations`) because the map render varies per run —
65+
# gating on it would re-trigger forever. It still ships whenever a
66+
# PLOT screenshot changes (monthly data updates), riding the same
67+
# commit.
68+
run: bash scripts/compose-og.sh
6069
- name: Push + re-run, if screenshots changed
6170
if: github.ref == 'refs/heads/www'
6271
id: screenshots
6372
run: |
64-
if git diff --name-only -- www/public/screenshots | grep -v ctbk-stations; then
73+
if git diff --name-only -- www/public/screenshots | grep -v -e ctbk-stations -e ctbk-og-mosaic; then
6574
git add www/public/screenshots
6675
git config --global user.name "GitHub Actions"
6776
git config --global user.email "github@actions"

www/scripts/compose-og.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
22
# Compose an og:image mosaic: dark stations map (left) + 2 stacked DM plots (right)
33
# Layout: map fills left ~70%, 2 near-square plots on right ~30% with gap between.
4-
# Requires: ImageMagick (magick)
4+
# Requires: ImageMagick — v7 (`magick`) or v6 (`convert`, e.g. ubuntu GHA runners)
55
set -e
66

7+
MAGICK="$(command -v magick || command -v convert)"
8+
magick() { "$MAGICK" "$@"; }
9+
710
cd "$(dirname "$0")/.."
811

912
SS=public/screenshots

0 commit comments

Comments
 (0)