mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 12:06:57 +02:00
Adds a packageManager field (pnpm@9.15.9) to package.json so corepack and pnpm/action-setup@v4 resolve a single pinned pnpm 9 version that matches lockfileVersion 9.0. Removes the floating 'version: latest' from the CI and screenshots workflows so they honor the packageManager field instead of pulling pnpm 10+, which breaks native module builds. Follow-up to #63.
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
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
|
|
|
|
- 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
|