-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.41 KB
/
chromatic.yml
File metadata and controls
53 lines (44 loc) · 1.41 KB
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: Storybook Chromatic Deployment
on:
pull_request:
branches: [main]
jobs:
storybook-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
autoAcceptChanges: true
- name: Get current time (KST)
uses: josStorer/get-current-time@v2
id: current-time
with:
format: "YYYY년 MM월 DD일 HH시 mm분 ss초"
utcOffset: "+09:00"
- name: Comment PR
if: always()
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: chromatic-preview-${{ github.event.number }}
message: |
🎨 **Storybook Preview**: ${{ steps.chromatic.outputs.storybookUrl }}
🔗 **Chromatic Build**: ${{ steps.chromatic.outputs.buildUrl }}
🕖 **Updated at**: ${{ steps.current-time.outputs.formattedTime }}