-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (65 loc) · 2.2 KB
/
storybook-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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: 'Storybook Chromatic Deployment'
on:
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 21
- name: Cache node modules
id: cache-node
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.OS }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Install dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Build tiki ui
id: cache-tiki-ui
uses: actions/cache@v4
with:
path: packages/ui/dist
key: ${{runner.os}}-ui-${{hashFiles('packages/ui/package.json', 'packages/ui/src/**')}}
restore-keys: ${{runner.os}}-ui-
- name: Build tiki icon
id: cache-tiki-icon
uses: actions/cache@v4
with:
path: packages/icon/dist
key: ${{runner.os}}-icon-${{hashFiles('packages/icon/package.json', 'packages/icon/src/**')}}
restore-keys: ${{runner.os}}-icon-
- name: Check ui cache hit
if: steps.cache-tiki-ui.outputs.cache-hit != 'true'
run: pnpm --filter ui build
- name: Check icon cache hit
if: steps.cache-tiki-icon.outputs.cache-hit != 'true'
run: pnpm --filter icon build
- name: Run Chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
🚀 Storybook 확인하기 🚀
- [Build](${{steps.chromatic.outputs.buildUrl}})
- [Preview](${{steps.chromatic.outputs.storybookUrl}})