-
Notifications
You must be signed in to change notification settings - Fork 295
39 lines (38 loc) · 1.17 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
name: 'Chromatic'
on:
pull_request:
types:
- labeled
push:
branches:
- develop
jobs:
chromatic-deployment:
if: contains(github.event.pull_request.labels.*.name, 'run Chromatic') || github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
env:
STORYBOOK_FREEZE_DATE: "true"
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install dependencies
run: yarn
- name: Publish to Chromatic
if: github.ref != 'refs/heads/develop'
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
buildScriptName: 'storybook:build:chromatic'
- name: Publish to Chromatic and auto accept changes
if: github.ref == 'refs/heads/develop'
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true
buildScriptName: 'storybook:build:chromatic'