Skip to content

Commit bfbc540

Browse files
authored
Merge pull request #256 from TylerAPfledderer/chore/restore-chromatic-runner
chore: restore chromatic GH runner
2 parents ac5daf5 + d4621b7 commit bfbc540

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/chromatic.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .github/workflows/chromatic.yml
2+
3+
# Workflow name
4+
name: Chromatic Publish and Testing
5+
6+
# Event for the workflow
7+
on:
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- ready_for_review
13+
paths:
14+
# Only run on file changes in any of these paths
15+
- "src/components/**/*"
16+
- "src/pages/**/*"
17+
- "src/layouts/**/*"
18+
- "src/@chakra-ui/**/*"
19+
20+
# List of jobs
21+
jobs:
22+
chromatic-deployment:
23+
# Operating System
24+
runs-on: ubuntu-latest
25+
# Job steps
26+
steps:
27+
# 👇 Version 2 of the action
28+
- name: Checkout repo
29+
uses: actions/checkout@v2
30+
with:
31+
fetch-depth: 0 # 👈 Required to retrieve git history
32+
- name: Install deps
33+
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
34+
run: yarn
35+
- name: Publish to Chromatic
36+
# 👇 Adds Chromatic as a step in the workflow
37+
uses: chromaui/action@v1
38+
# Options required for Chromatic's GitHub Action
39+
with:
40+
projectToken: fee8e66c9916
41+
# 👇 Only fail if Storybook contains stories that error
42+
exitZeroOnChanges: true

0 commit comments

Comments
 (0)