Skip to content

Commit 0d979d0

Browse files
committed
👷: Add workflow to test storybook on CI
Signed-off-by: Alexandre Nicolaie <[email protected]>
1 parent ececa37 commit 0d979d0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: 📸 Chromatic Storybook
3+
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- src/components/**
9+
- .storybook/**
10+
- package.json
11+
- pnpm-lock.yaml
12+
pull_request:
13+
paths:
14+
- src/components/**
15+
- .storybook/**
16+
- package.json
17+
- pnpm-lock.yaml
18+
19+
permissions: {}
20+
21+
jobs:
22+
chromatic:
23+
name: 📸 Chromatic Storybook
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
steps:
28+
- name: ⬇️ Checkout repository
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
with:
31+
fetch-depth: 0
32+
33+
- name: 🏗️ Setup Node.js
34+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
35+
with:
36+
node-version: 20
37+
38+
- name: 📦 Install PNPM
39+
run: npm install -g pnpm
40+
41+
- name: 📦 Install dependencies
42+
run: pnpm install
43+
44+
- name: 📸 Run Chromatic
45+
uses: chromaui/action@e8cc4c31775280b175a3c440076c00d19a9014d7 # v11.28.2
46+
with:
47+
exitOnceUploaded: true
48+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

0 commit comments

Comments
 (0)