Skip to content

Commit

Permalink
docs: storybook-deployer 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzoo committed Oct 30, 2024
1 parent 822d122 commit 0fe73c1
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: 'Chromatic Deployment'
name: 'Storybook Deployment'

on:
pull_request:
branches:
- develop

permissions:
contents: read
pages: write
id-token: write

jobs:
test:
name: Storybook Chromatic Deployment
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -26,11 +20,10 @@ jobs:
node-version: 21

- name: Build and Publish
uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm build-storybook
path: storybook-static
checkout: false
run: |
pnpm install
pnpm deploy-storybook -- --ci
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


4 changes: 3 additions & 1 deletion 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": "build-storybook -s public",
"deploy-storybook": "storybook-to-ghpages",
"chromatic": "npx chromatic --project-token=chpt_f4088febbfb82b7",
"typeCheck": "tsc --noEmit",
"check": "concurrently \"pnpm lint\" \"pnpm typeCheck\""
Expand Down Expand Up @@ -41,6 +42,7 @@
"@storybook/builder-vite": "^8.2.6",
"@storybook/react": "^8.2.6",
"@storybook/react-vite": "^8.2.6",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/test": "^8.2.6",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.14.9",
Expand Down
Loading

0 comments on commit 0fe73c1

Please sign in to comment.