ci: optimize chromatic (#8776)

* Update ci.yaml

Modified the Chromatic job configuration to reduce snapshot usage and only run Chromatic on necessary UI changes.

Signed-off-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>

* fix fmt

---------

Signed-off-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
Co-authored-by: Reuben Ellis <ethriel3695@gmail.com>
This commit is contained in:
Bruno Quaresma 2023-07-27 15:51:26 -03:00 committed by GitHub
parent c236a29307
commit 3114a60e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -575,10 +575,17 @@ jobs:
with:
buildScriptName: "storybook:build"
exitOnceUploaded: true
# This will prevent CI from failing when Chromatic detects visual changes
exitZeroOnChanges: true
# Chromatic states its fine to make this token public. See:
# https://www.chromatic.com/docs/github-actions#forked-repositories
projectToken: 695c25b6cb65
workingDir: "./site"
# Prevent excessive build runs on minor version changes
skip: "@(renovate/**|dependabot/**)"
# Run TurboSnap to trace file dependencies to related stories
# and tell chromatic to only take snapshots of relevent stories
onlyChanged: true
# This is a separate step for mainline only that auto accepts and changes
# instead of holding CI up. Since we squash/merge, this is defensive to
@ -594,9 +601,14 @@ jobs:
STORYBOOK: true
with:
autoAcceptChanges: true
# This will prevent CI from failing when Chromatic detects visual changes
exitZeroOnChanges: true
buildScriptName: "storybook:build"
projectToken: 695c25b6cb65
workingDir: "./site"
# Run TurboSnap to trace file dependencies to related stories
# and tell chromatic to only take snapshots of relevent stories
onlyChanged: true
offlinedocs:
name: offlinedocs