Skip to content

Commit aa3c8eb

Browse files
committed
ci: re-run catalog previews when the temp-dir module changes
Routing the renderer through `createCatalogPreviewTempDir` made that module part of its runtime path, and the workflow already states the rule for the sibling case: a module the renderer imports has to appear in the trigger, or a change to it alone never re-runs the job that exercises it. Add it to the `paths:` filter and to the renderer canary, so a PR touching only the temp-dir allocation still renders both shape canaries. Verified against this branch's own range: the previous argument list does not report the file, so a helper-only PR was invisible to both checks.
1 parent bdf9445 commit aa3c8eb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/catalog-previews.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ on:
1515
- "registry/blocks/**"
1616
- "registry/components/**"
1717
- "scripts/generate-catalog-previews.ts"
18-
# The containment module the renderer imports. Without it a change to
19-
# path-traversal defence alone never re-runs the job that exercises it.
18+
# Modules the renderer imports. Without them a change to path-traversal
19+
# defence or temp-directory allocation alone never re-runs the job that
20+
# exercises it.
2021
- "scripts/registry-target-paths.mjs"
22+
- "scripts/catalog-preview-temp.ts"
2123
- ".github/workflows/catalog-previews.yml"
2224

2325
concurrency:
@@ -87,7 +89,8 @@ jobs:
8789
# timeline at body level (rendered directly). Getting that wrong is
8890
# silent — the wrong-shaped block renders blank, not red.
8991
RENDERER_CHANGED=$(git diff --name-only --diff-filter=ACMR "$BASE_SHA"...HEAD \
90-
-- scripts/generate-catalog-previews.ts scripts/registry-target-paths.mjs)
92+
-- scripts/generate-catalog-previews.ts scripts/registry-target-paths.mjs \
93+
scripts/catalog-preview-temp.ts)
9194
if [ -n "$RENDERER_CHANGED" ]; then
9295
CHANGED_ITEMS=$(printf '%s\n' $CHANGED_ITEMS \
9396
code-snippet-visual-studio-dark code-snippet-apple-terminal-pro | sort -u)

0 commit comments

Comments
 (0)