Update README screenshots #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update README screenshots | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths: [.github/workflows/screenshots.yml] | |
| schedule: | |
| - cron: '0 0 * * 1,4' # Runs at 00:00 UTC every Monday and Thursday | |
| jobs: | |
| update-readme-snapshots: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/gwennlbh/playwright-bun:v1.57.0 | |
| options: --user 1001 | |
| env: | |
| BUILD_COMMIT: ${{ github.sha }} | |
| BASE_PATH: /cigale | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: .bun-version | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build site | |
| run: bun run build | |
| - name: Run Playwright readme.spec.js and update screenshots | |
| run: bunx playwright test tests/tasks/readme.spec.js --update-snapshots | |
| env: | |
| RUN_README_TESTS: '1' | |
| - name: Remove test-results.json | |
| run: rm test-results.json || true | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: '📝 Update README screenshots' | |
| title: '📝 Update README screenshots' | |
| body: | | |
| This PR was automatically generated by the [update-readme-snapshots workflow](https://github.com/${{ github.repository }}/actions/workflows/readme.yml). | |
| branch: readme-screenshots | |
| base: main |