Skip to content

Commit 047342b

Browse files
test(docs): enforce generated public image inventory
1 parent de472cc commit 047342b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/ci-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
timeout --kill-after=30s 15m bun run test:storybook
121121
bun run export:readme-assets
122122
if [[ -n "$(git status --porcelain --untracked-files=all -- ../docs/images/readme)" ]]; then
123-
echo "::error::README images are stale. Run 'bun run --filter webapp export:readme-assets' and commit the result."
123+
echo "::error::README or documentation images are stale. Run 'bun run --filter webapp export:readme-assets' and commit the result."
124124
git status --short --untracked-files=all -- ../docs/images/readme
125125
exit 1
126126
fi

webapp/scripts/export-readme-assets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { spawn } from "node:child_process";
2-
import { mkdir } from "node:fs/promises";
2+
import { mkdir, rm } from "node:fs/promises";
33
import { resolve } from "node:path";
44

55
import { type Browser, chromium } from "playwright";
@@ -104,6 +104,7 @@ async function capture(
104104
}
105105
}
106106

107+
await rm(outputDirectory, { recursive: true, force: true });
107108
await mkdir(outputDirectory, { recursive: true });
108109
const storybook = spawn(
109110
"bun",

0 commit comments

Comments
 (0)