fix: remove cacheDir override and node_modules CI caching - #32587
Draft
mvvmm wants to merge 1 commit into
Draft
Conversation
Remove the cacheDir: ".astro-cache" override from astro.config.ts, reverting to Astro's default node_modules/.astro. Remove direct node_modules caching from all GitHub Actions workflows — rely solely on setup-node's cache: pnpm (pnpm store) instead. This eliminates the stale content-layer cache problem that originally motivated the cacheDir override in #31192. The targeted Astro assets cache is kept but updated to use the default path (node_modules/.astro/assets).
kodster28
approved these changes
Aug 6, 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.
Summary
Removes the
cacheDir: ".astro-cache"override fromastro.config.ts, reverting to Astro's defaultnode_modules/.astro. This was originally added in #31192 to work around a stale-cache problem caused by CI caching the entirenode_modulesdirectory — the dependency-only cache key (pnpm-lock.yaml+package.jsonhashes) didn't account for content/source changes, so stale Astro content-layer state persisted across runs.Instead of working around the problem by moving the cache directory, this PR removes the root cause: the direct
node_modulescaching in all GitHub Actions workflows. All jobs now rely solely onsetup-node'scache: pnpm(which caches the pnpm store, notnode_modulesitself) and runpnpm install --frozen-lockfileunconditionally. The targeted Astro assets cache is kept but updated to use the default path (node_modules/.astro/assets).This also aligns the repo with Workers Builds' built-in Astro caching, which hardcodes
node_modules/.astroas the cache directory.Files changed:
astro.config.ts— removedcacheDiroverride and.astro-cachefrom Vite watch ignored paths.gitignore— removed.astro-cache/entry.github/workflows/ci.yml— removednode_modulescache/restore steps from all 5 jobs; updated Astro assets cache path tonode_modules/.astro/assets.github/workflows/publish-production.yml— same.github/workflows/bonk.yml,bigbonk.yml,anchor-link-audit.yml— removednode_modulescache/restore stepsScreenshots (optional)
Documentation checklist