Skip to content

Instantly share code, notes, and snippets.

@nautilytics
Created September 12, 2022 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nautilytics/c8184e1a9bc98cb5f0dcaf40e63eea59 to your computer and use it in GitHub Desktop.
Save nautilytics/c8184e1a9bc98cb5f0dcaf40e63eea59 to your computer and use it in GitHub Desktop.
A GitHub Action for running Percy across Storybook Scenarios
name: Run Percy.io across Storybook Scenarios
on:
pull_request:
branches: [ main ]
jobs:
percy:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
runs-on: ubuntu-latest
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_TARGET_BRANCH: main
name: Deploy Steps
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.18.3'
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
- name: Install dependencies 🔧
run: yarn install
- name: Build Storybook 📖
run: yarn run build-storybook
- name: Run Percy tests 🚀
run: npx percy storybook ./storybook-static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment