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
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Build and Deploy Storybook to Vercel
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
paths:
|
|
- 'app/client/packages/design-system/**'
|
|
|
|
jobs:
|
|
storybook-deploy-release:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_WDS_PROJECT_ID }}
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: release
|
|
|
|
- name: Install Vercel CLI
|
|
run: npm install --global vercel@latest
|
|
|
|
- name: Use Node.js 16.14.0
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16.14.0"
|
|
|
|
- name: Pull Vercel Environment Information
|
|
working-directory: ./app/client/packages/storybook
|
|
run: vercel pull --yes --token=${{ secrets.VERCEL_WDS_TOKEN }}
|
|
|
|
- name: Build Project Artifacts
|
|
working-directory: ./app/client/packages/storybook
|
|
run: vercel build --prod --yes --token=${{ secrets.VERCEL_WDS_TOKEN }}
|
|
|
|
|
|
- name: Deploy Project Artifacts to Vercel
|
|
working-directory: ./app/client/packages/storybook
|
|
id: set-dpurl
|
|
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_WDS_TOKEN }}
|