File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CD - Deploy Storybook
1+ name : CD - Deploy
22
33on :
44 push :
55 branches :
66 - main
77
88jobs :
9- deploy-storybook :
9+ deploy :
1010 runs-on : ubuntu-latest
11- environment :
12- name : github-pages
1311 permissions :
1412 contents : read
1513 pages : write
1614 id-token : write
1715 steps :
1816 - name : Checkout repo
1917 uses : actions/checkout@v4
20- with :
21- persist-credentials : false
2218
2319 - name : Setup Node.js
2420 uses : actions/setup-node@v4
2521 with :
2622 node-version : 22
2723
28- - uses : bitovi/github-actions-storybook-to-github-pages@v1.0.3
24+ - name : Install dependencies
25+ run : npm ci
26+
27+ - name : Build Vite app
28+ run : npm run build
29+
30+ - name : Build Storybook
31+ run : npm run build-storybook
32+
33+ - name : Prepare deployment directory
34+ run : |
35+ mkdir public
36+ cp -r dist/* public/
37+ mkdir -p public/storybook
38+ cp -r storybook-static/* public/storybook/
39+
40+ - name : Deploy to GitHub Pages
41+ uses : peaceiris/actions-gh-pages@v4
2942 with :
30- install_command : npm ci
31- build_command : npm run build-storybook
32- path : storybook-static
33- checkout : false
43+ github_token : ${{ secrets.GITHUB_TOKEN }}
44+ publish_dir : ./public
45+ commit_message : ' Deploy Vite + Storybook [ci skip]'
You can’t perform that action at this time.
0 commit comments