-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (50 loc) · 1.58 KB
/
chromatic.yml
File metadata and controls
60 lines (50 loc) · 1.58 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
54
55
56
57
58
59
60
name: 📘 Chromatic UI Test
on:
pull_request:
branches:
- develop
permissions:
pull-requests: write
issues: write
jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Find existing comment
id: find_comment
uses: peter-evans/find-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-includes: "<!-- chromatic-storybook-deployment -->"
- name: Add PR comment for Chromatic deployment
if: steps.find_comment.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- chromatic-storybook-deployment -->
MATEBALL-STORYBOOK
[⚾ Storybook 배포가 완료되었습니다!](${{ steps.chromatic.outputs.storybookUrl }})