feat: Add Clerk Schemas #339
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow name | |
name: 'Chromatic Deployment' | |
# Event for the workflow | |
on: push | |
# List of jobs | |
jobs: | |
test: | |
name: 'Chromatic Deployment' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out Git repository' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'Check secrets' | |
id: check-secrets | |
run: echo "has-secrets=$([ -n "${{ env.CHROMATIC_PROJECT_TOKEN }}" ] && echo true || echo false)" >> $GITHUB_OUTPUT | |
env: | |
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
- name: Setup Node | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- name: 'Warn required secrets' | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'false' }} | |
run: echo 'CHROMATIC_PROJECT_TOKEN missing in Github secrets. Skipping Storybook deployment.' | |
- name: 'Install dependencies' | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
run: yarn | |
- uses: chromaui/action@v1 | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
with: | |
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/en/deploy/ to obtain it | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
STORYBOOK_BACKEND_URL: ${{ secrets.BACKEND_URL }} |