Skip to content

Develop

Develop #4

name: Update Screenshots
on:
push:
branches: [develop]
pull_request:
branches: [develop, main]
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
mockups: ${{ steps.filter.outputs.mockups }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
mockups:
- '_bmad-output/planning-artifacts/ux-design-directions.html'
- 'scripts/generate-screenshots.mjs'
generate:
needs: changes
if: needs.changes.outputs.mockups == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: develop
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Install pngquant
run: sudo apt-get install -y pngquant
- name: Generate screenshots
run: node scripts/generate-screenshots.mjs
- name: Check for changes
id: changes
run: |
git diff --quiet docs/src/assets/screenshots/ || echo "changed=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true' && github.event_name == 'push'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update mockup screenshots"
branch: auto/update-screenshots
base: develop
delete-branch: true
title: "chore: update mockup screenshots"
body: |
This PR was automatically generated by the update-screenshots workflow.
Screenshots have been regenerated from the UX design mockups.
labels: |
automated
documentation
generate-skipped:
needs: changes
if: needs.changes.outputs.mockups != 'true'
runs-on: ubuntu-latest
steps:
- run: echo "No mockup changes detected, skipping screenshot generation"