.github/workflows/percy.yml
name: Percy
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- master
jobs:
run-visual-regression-tests:
# Run on (master) push or non-draft PRs
if: github.event_name == 'push' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout repository files
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "16"
- run: npm ci
- run: npm run percy-storybook
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}