Build and Deploy Storybook to Chromatic #9
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
name: Build and Deploy Storybook to Chromatic | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
run: npm install | |
working-directory: ./ui | |
- name: Build Storybook | |
run: npm run build-storybook | |
working-directory: ./ui | |
- name: Publish to Chromatic | |
uses: chromaui/action@v11 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
projectToken: chpt_0314d7b0d66ad0c | |
storybookBuildDir: "storybook-static" | |
workingDir: "./ui" |