Skip to content

[Init/#8] Storybook μ„ΈνŒ… 및 μžλ™ 배포 μ„€μ • #2

[Init/#8] Storybook μ„ΈνŒ… 및 μžλ™ 배포 μ„€μ •

[Init/#8] Storybook μ„ΈνŒ… 및 μžλ™ 배포 μ„€μ • #2

Workflow file for this run

name: 'Storybook Deployment'
on:
pull_request:
branches:
- develop
permissions:
contents: write
pull-requests: write
jobs:
storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-storybook
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-storybook
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v10
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
autoAcceptChanges: true
- name: Comment PR
if: github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🍰 Storybook 배포가 μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€! πŸ”— ${{ steps.chromatic.outputs.storybookUrl }}'