Skip to content

Commit

Permalink
Chromatic 배포 CI를 설정한다 (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
skiende74 authored Jul 22, 2024
2 parents 441fc3d + 511df07 commit aeb579e
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
name: 'Chromatic Deployment'
name: "Chromatic"

on:
push:
branches: ['dev-fe']
paths:
- 'frontend/**'
on: push

jobs:
test:
# Operating System
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- run: yarn
working-directory: frontend
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
- name: Checkout code
uses: actions/checkout@v4
with:
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/ko/deploy/ to obtain it
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Comment on PR
uses: thollander/actions-comment-pull-request@v1
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
message: '🚀 **storybook**: ${{ steps.publish_chromatic.outputs.storybookUrl }}'
node-version: 20
- name: Install dependencies
run: |
cd frontend
yarn install --frozen-lockfile
- name: Run Chromatic
run: |
cd frontend
npx chromatic --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes

0 comments on commit aeb579e

Please sign in to comment.