chore: fix turbosnap setting #225
Workflow file for this run
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: Chromatic CI | |
on: push | |
jobs: | |
chromatic: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.19.0] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin ${{ github.base_ref }} --depth=1 | |
- id: diff | |
run: echo "::set-output name=changed::$(git diff --name-only origin/${{ github.base_ref }} HEAD --relative ./packages/ui/ | wc -l)" | |
- name: Install packages | |
uses: ./.github/actions/install-packages | |
if: ${{ steps.diff.outputs.changed != '0' }} | |
# - name: Chromatic | |
# uses: chromaui/action@latest | |
# if: ${{ steps.diff.outputs.changed != '0' }} | |
# with: | |
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
# workingDir: packages/ui | |
# exitZeroOnChanges: true | |
# onlyChanged: true | |
# env: | |
# LOG_LEVEL: 'debug' | |
- name: Chromatic | |
if: ${{ steps.diff.outputs.changed != '0' }} | |
run: | | |
bun build-storybook | |
bunx chromatic -d ./packages/ui/storybook-static --storybook-base-dir ./packages/ui --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes --only-changed |