-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.38 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
46
47
48
49
50
51
52
53
54
55
56
57
# .github/workflows/chromatic.yml
name: "Chromatic Deployment"
run-name: Storybook deployment by ${{ github.actor }}
on:
pull_request:
branches:
- develop
paths:
- "**.stories.tsx"
jobs:
chromatic:
name: Run Chromatic Deployment
# Operating System
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
# Job steps
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
- name: Install dependencies
run: pnpm install
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build-storybook
onlyChanged: true
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: "💅 ## storybook-URL - ${{ steps.chromatic.outputs.storybookUrl }}"