forked from appsmithorg/appsmith
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.41 KB
/
build-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
name: "Build Storybook - UI Tests with Chromatic"
on:
push:
branches:
- release
paths:
- "app/client/packages/design-system/**"
- "app/client/packages/storybook/**"
pull_request:
paths:
- "app/client/packages/design-system/**"
- "app/client/packages/storybook/**"
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout PR if pull_request event
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Checkout PR if push event
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: release
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: app/client/package.json
- name: Install Dependencies
working-directory: ./app/client/packages/storybook
run: yarn install --immutable
- name: Publish to Chromatic
id: chromatic-publish
uses: chromaui/action@v1
env:
CHROMATIC: 1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: ./app/client/packages/storybook
exitOnceUploaded: true
buildScriptName: "build"