-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.29 KB
/
chromatic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Chromatic CI
on:
# push:
# branches:
# - main
pull_request:
branches:
- main
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