-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.72 KB
/
storybook.yml
File metadata and controls
67 lines (58 loc) · 1.72 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
61
62
63
64
65
66
67
name: Storybook Deployment
run-name: ${{ github.actor }}의 스토리북 배포
on:
pull_request:
branches:
- develop
paths:
- 'shared/**'
permissions:
contents: read
pull-requests: write
deployments: write
jobs:
storybook-deploy:
runs-on: ubuntu-24.04
outputs:
storybook_url: ${{ steps.chromatic.outputs.storybookUrl }}
build_url: ${{ steps.chromatic.outputs.buildUrl }}
status: ${{ job.status }}
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup pnpm
uses: pnpm/action-setup@v5
with:
version: latest
run_install: false
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: publish to chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
autoAcceptChanges: true
comment-pr:
runs-on: ubuntu-latest
needs: [storybook-deploy]
if: always()
steps:
- name: comment PR
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: storybook-${{ github.event.number }}
message: |
## 🚀 Storybook 배포
**📖 Storybook:** ${{ needs.storybook-deploy.outputs.storybook_url }}
**🔗 Chromatic Build:** ${{ needs.storybook-deploy.outputs.build_url }}
**✅ Status:** ${{ needs.storybook-deploy.outputs.status }}