Skip to content

fix: restore the og-image render cache, save it only on main - #214

Merged
ppawlowski merged 1 commit into
mainfrom
fix/og-image-render-cache
Aug 14, 2026
Merged

fix: restore the og-image render cache, save it only on main#214
ppawlowski merged 1 commit into
mainfrom
fix/og-image-render-cache

Conversation

@dimitrieh

Copy link
Copy Markdown
Contributor

Follows #213, which narrowed this cache to the font download alone.

The font-only entry never populates. On every website main build since #213 it misses on both its exact key and its og-image-font-${{ runner.os }}- prefix, and no save follows in the post steps, so nothing is ever written for the next run to find. The directory it points at is not where a font lands either: the only font download in the build is @nuxt/fonts pulling Heebo from jsdelivr into its own cache. Before #213 the same path pair restored about 4 MB on every run, and that content was the rendered images, not a font.

Net effect today is that every og-image renders from scratch on every build, which is a measurable slice of the prerender phase.

Change. Restore both directories again and keep the github.run_id key so the entry can keep accumulating, but move the write into a separate actions/cache/save step gated on the default branch. #213's objection to #5562 was that a save per push left an entry per push, and that objection stands. Saving only on main caps it to a handful of entries a day while pull requests still restore from the newest one.

fix: cuts a patch and force-moves build_website/v1, so neither caller needs a ref change.

The font-only entry never populates: it misses on both its exact key and
its prefix on every run, and no save follows, so the build renders every
og-image from scratch. The directory it points at is not where a font
lands either, the only font download in the build is @nuxt/fonts pulling
Heebo into its own cache.

Restore the rendered-image directory alongside it and keep the run_id key
so the entry can accumulate, but move the write into a separate save step
that only runs on the default branch. That was the reason for narrowing
the cache in the first place: a save per push left an entry per push.
@dimitrieh
dimitrieh requested a review from ppawlowski August 14, 2026 11:42
@dimitrieh

Copy link
Copy Markdown
Contributor Author

@ppawlowski
ppawlowski merged commit 7137cbe into main Aug 14, 2026
1 check passed
@ppawlowski
ppawlowski deleted the fix/og-image-render-cache branch August 14, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants