-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.36 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
# Workflow name
name: 'Chromatic Storybook Auto Deployment'
# Event for the workflow
on: pull_request
# List of jobs
jobs:
storybook:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v4 # Update to the latest version of checkout action
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v3 # Example of using a different action
with:
node-version: 18
- name: Install pnpm
run: npm install -g [email protected]
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: pnpm install
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest # Update to the latest version of Chromatic action
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🚀 Storybook 자동 배포 URL: ${{ steps.chromatic.outputs.storybookUrl }}'