-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (42 loc) · 1.16 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
# .github/workflows/chromatic.yml
# Workflow name
name: 'Chromatic'
# Event for the workflow
on:
push:
branches:
- 'main'
pull_request:
types: [opened, reopened, synchronize]
# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# Job steps
steps:
- if: env.CHROMATIC_PROJECT_TOKEN != ''
uses: actions/checkout@v2
with:
fetch-depth: 0 # Required for v2
- if: env.CHROMATIC_PROJECT_TOKEN != ''
name: Install dependencies
run: npm i
- if: env.CHROMATIC_PROJECT_TOKEN != ''
name: Load .env file
uses: xom9ikk/dotenv@v2
with:
mode: test
- if: env.CHROMATIC_PROJECT_TOKEN != ''
name: Publish to Chromatic
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
exitOnceUploaded: true
autoAcceptChanges: main
# Skip running Chromatic on dependabot PRs
skip: dependabot/**