From f28c5671c123ef13b4163d4adbc3572d56f1d4ff Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Fri, 20 Mar 2026 21:22:29 +0100 Subject: [PATCH] ci: add manual workflow to regenerate landing page screenshots Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/screenshots.yml | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/screenshots.yml diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml new file mode 100644 index 0000000..f4556b1 --- /dev/null +++ b/.github/workflows/screenshots.yml @@ -0,0 +1,47 @@ +name: Screenshots + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + screenshots: + name: Capture Landing Page Screenshots + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: latest + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - name: Install Playwright with system deps + run: pnpm exec playwright install --with-deps chromium + + - name: Build app + run: pnpm build + env: + DATABASE_URL: ./data/screenshots.db + + - name: Capture screenshots + run: pnpm exec tsx scripts/screenshots.ts + env: + DATABASE_URL: ./data/screenshots.db + + - name: Commit and push + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add website/assets/screenshot-*.png + git diff --cached --quiet && echo "No changes" && exit 0 + git commit -m "chore: update landing page screenshots [skip ci]" + git push