Skip to content

Commit

Permalink
bulid: storybook 배포 github action
Browse files Browse the repository at this point in the history
  • Loading branch information
nayounsang committed Jan 29, 2024
1 parent b268af4 commit 05c85f0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Workflow name
name: 'Chromatic Deployment'

# Event for the workflow
on: push

# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- run: yarn
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
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 }}
20 changes: 16 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"publish-storybook": "npx chromatic --project-token=chpt_645d82175874a7d"
},
"dependencies": {
"@emotion/react": "^11.11.1",
Expand Down Expand Up @@ -47,7 +48,7 @@
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"chromatic": "^10.0.0",
"chromatic": "^10.6.1",
"eslint": "^8.45.0",
"eslint-plugin-mui-path-imports": "^0.0.15",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down

0 comments on commit 05c85f0

Please sign in to comment.