File tree Expand file tree Collapse file tree
skills/capture-pr-visuals Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,9 +88,16 @@ which ffmpeg 2>/dev/null
8888
8989If ffmpeg is missing, warn: "ffmpeg not found — screenshots only (no GIFs). Install with ` brew install ffmpeg ` for GIF support."
9090
91- ### Step 5: Write and Execute Playwright Capture Script
91+ ### Step 5: Clean Old Artifacts and Capture New Ones
9292
93- Create a temporary capture script at ` .chalk/local/capture-script.ts ` :
93+ First, clean any previous screenshots to ensure a fresh capture:
94+
95+ ``` bash
96+ rm -rf .github/pr-screenshots/ 2> /dev/null
97+ mkdir -p .github/pr-screenshots/
98+ ```
99+
100+ Then create a temporary capture script at ` .chalk/local/capture-script.ts ` :
94101
95102``` typescript
96103import { chromium } from ' playwright' ;
@@ -179,11 +186,9 @@ rm -rf .github/pr-screenshots/videos
179186
180187### Step 7: Commit Artifacts
181188
182- Clean old screenshots first, then commit new ones :
189+ Commit the new visual artifacts :
183190
184191``` bash
185- rm -rf .github/pr-screenshots/ 2> /dev/null
186- # (capture runs in Step 5, producing new files)
187192git add .github/pr-screenshots/
188193git commit -m " chore: add PR visual artifacts"
189194```
You can’t perform that action at this time.
0 commit comments