-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.55 KB
/
chromatic.yml
File metadata and controls
69 lines (63 loc) · 1.55 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# This workflow runs on push | pull_request events of the develop branch
#
# It will publish storybook to Chromatic.
#
name: 'Chromatic'
on:
push:
branches:
- develop
paths:
- yarn.lock
- stories/**
- packages/**
- .storybook/**
pull_request:
branches:
- develop
paths:
- yarn.lock
- stories/**
- packages/**
- .storybook/**
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
#
# Checkout the project
#
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 0
#
# Cache files
#
- name: Cache
uses: actions/[email protected]
with:
path: |
node_modules/
.eslintcache
**/.cache
packages/**/node_modules/
key: ${{ github.ref }}-styled-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ github.ref }}-styled-
#
# Install dependencies
#
- name: Build components
run: yarn install --frozen-lockfile && yarn bootstrap && yarn build
#
# Publish storybook on Chromatic and accept changes.
#
- name: Publish to Chromatic
uses: chromaui/action@v1
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false }}
with:
projectToken: ${{ secrets.CHROMATIC_TOKEN }}
autoAcceptChanges: github.ref == 'refs/heads/develop'
exitOnceUploaded: github.ref != 'refs/heads/develop'