File tree Expand file tree Collapse file tree 3 files changed +38
-2
lines changed
Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Storybook to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : Setup Node.js
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : ' 20'
19+ cache : ' npm'
20+
21+ - name : Install dependencies
22+ run : npm ci
23+
24+ - name : Build Storybook
25+ run : npm run build-storybook
26+
27+ - name : Deploy to GitHub Pages
28+ uses : JamesIves/github-pages-deploy-action@v4
29+ with :
30+ folder : storybook-static
31+ branch : gh-pages
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ dist-ssr
2828# TypeScript cache
2929* .tsbuildinfo
3030tsconfig.tsbuildinfo
31+
32+ # Storybook
33+ storybook-static /
Original file line number Diff line number Diff line change 2323 "lint" : " eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" ,
2424 "preview" : " vite preview" ,
2525 "storybook" : " npx storybook dev -p 6006" ,
26- "build-storybook" : " npx storybook build"
26+ "build-storybook" : " npx storybook build" ,
27+ "deploy-storybook" : " storybook-to-ghpages"
2728 },
2829 "dependencies" : {
2930 "@react-three/drei" : " ^9.99.0" ,
5354 "eslint-plugin-react-hooks" : " ^4.6.0" ,
5455 "eslint-plugin-react-refresh" : " ^0.4.5" ,
5556 "typescript" : " ^5.2.2" ,
56- "vite" : " ^5.1.0"
57+ "vite" : " ^5.1.0" ,
58+ "storybook-to-ghpages" : " ^1.0.0"
5759 },
5860 "peerDependencies" : {
5961 "react" : " ^18.2.0" ,
You can’t perform that action at this time.
0 commit comments