This PR adds the integration for chromatic which will help us catch visual bugs in the WDS components. The way it works is, the PR won't allowed to merge till reviewers reviews all the changes in the components. One thing to note is the workflow only works when there is a change in design system files. Fixes #21923
36 lines
947 B
YAML
36 lines
947 B
YAML
name: 'Build Storybook Preview and Publish to Chromatic'
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'app/client/packages/design-system/**'
|
|
|
|
jobs:
|
|
chromatic-deployment:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
|
|
- name: Use Node.js 16.14.0
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16.14.0"
|
|
|
|
- name: Install Dependencies
|
|
working-directory: ./app/client/packages/storybook
|
|
run: yarn install --immutable
|
|
|
|
- name: Publish to Chromatic
|
|
id: chromatic-publish
|
|
uses: chromaui/action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
workingDir: ./app/client/packages/storybook
|
|
exitOnceUploaded: true
|