fix: restore the og-image render cache, save it only on main - #214
Merged
Conversation
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.
Contributor
Author
ppawlowski
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #213, which narrowed this cache to the font download alone.
The font-only entry never populates. On every website
mainbuild since #213 it misses on both its exact key and itsog-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/fontspulling 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_idkey so the entry can keep accumulating, but move the write into a separateactions/cache/savestep 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 onmaincaps it to a handful of entries a day while pull requests still restore from the newest one.fix:cuts a patch and force-movesbuild_website/v1, so neither caller needs a ref change.