-
Notifications
You must be signed in to change notification settings - Fork 172
36 lines (30 loc) · 1004 Bytes
/
chromatic.yml
File metadata and controls
36 lines (30 loc) · 1004 Bytes
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
# .github/workflows/chromatic.yml
name: "Chromatic"
on: push
jobs:
chromatic:
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Cache node_modules
id: node-modules-cache
uses: actions/cache@v4.2.3
with:
path: node_modules
key: node-modules-cache-${{ hashFiles('package-lock.json', '.npmrc') }}
save-always: true
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline
- name: Run Chromatic
if: env.CHROMATIC_PROJECT_TOKEN
uses: chromaui/action@v13.1.2
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true # 👈 Required option to enable TurboSnap
storybookBaseDir: ./packages/ui-components