Skip to content

Commit

Permalink
feat: skip chromatic if no diffs in snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasai-T committed Apr 6, 2022
1 parent 208ccb6 commit 4b240ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ jobs:
- uses: actions/checkout@v3.0.0
with:
fetch-depth: 0 # 👈 Required to retrieve git history
# Skip if there is no difference in snapshots
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: packages/components/**/*.storyshot
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npm install
if: env.GIT_DIFF
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
Expand All @@ -26,3 +31,4 @@ jobs:
token: ${{ secrets.github_token }}
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
if: env.GIT_DIFF

0 comments on commit 4b240ab

Please sign in to comment.