-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.55 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
# Workflow name
name: 'Chromatic Publish'
# Event for the workflow
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# List of jobs
jobs:
chromatic:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Install Chromatic
run: npm install --save-dev chromatic
working-directory: ./packages/ui
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
name: Run Chromatic
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken,
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
workingDir: packages/ui # 👈 Working directory for the Chromatic CLI
exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
skip: '@(renovate/**|dependabot/**)' # 👈 Option to skip Chromatic builds for PRs created by Renovate and Dependabot
onlyChanged: true # 👈 Enable TurboSnap (only update snapshots for changed files)
externals: |
- '/styles/**'