File tree Expand file tree Collapse file tree 4 files changed +69
-17
lines changed Expand file tree Collapse file tree 4 files changed +69
-17
lines changed Original file line number Diff line number Diff line change 1+ # Workflow name
2+ name : Build and Publish Storybook to GitHub Pages
3+
4+ on :
5+ # Event for the workflow to run on
6+ push :
7+ branches :
8+ - ' storybook-resurrect' # Replace with the branch you want to deploy from
9+
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ # List of jobs
16+ jobs :
17+ deploy :
18+ runs-on : ubuntu-latest
19+ # Job steps
20+ steps :
21+ # Manual Checkout
22+ - uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ # Set up Node
26+ - uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 20'
29+ # 👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
30+ 31+ with :
32+ install_command : yarn install # default: npm ci
33+ build_command : yarn build-storybook # default: npm run build-storybook
34+ path : storybook-static # default: dist/storybook
35+ checkout : false # default: true
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ yarn-error.log*
3232sh.exe.stackdump
3333/dist
3434/.vscode
35+
36+ * storybook.log
37+ storybook-static
Original file line number Diff line number Diff line change 1- module . exports = {
2- core : {
3- builder : ' webpack5',
4- } ,
5- stories : [ '../src/**/*.stories.@(js|mdx)' ] ,
6- addons : [
7- {
8- name : '@storybook/addon-docs' ,
9- options : {
10- configureJSX : true ,
11- babelOptions : { } ,
12- sourceLoaderOptions : null
13- }
14- } ,
15- ' @storybook/addon-essentials' ,
16- '@storybook/addon-actions'
17- ]
1+
2+
3+ /** @type { import('@storybook/react- webpack5').StorybookConfig } */
4+ const config = {
5+ " stories" : [
6+ "../src/**/*.mdx" ,
7+ "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
8+ ] ,
9+ "addons" : [
10+ "@storybook/addon-webpack5-compiler-swc" ,
11+ "@storybook/addon-docs" ,
12+ "@storybook/addon-onboarding"
13+ ] ,
14+ "framework" : {
15+ "name" : " @storybook/react-webpack5" ,
16+ "options" : { }
17+ }
1818} ;
19+ export default config ;
Original file line number Diff line number Diff line change 1+ /** @type { import('@storybook/react-webpack5').Preview } */
2+ const preview = {
3+ parameters : {
4+ controls : {
5+ matchers : {
6+ color : / ( b a c k g r o u n d | c o l o r ) $ / i,
7+ date : / D a t e $ / i,
8+ } ,
9+ } ,
10+ } ,
11+ } ;
12+
13+ export default preview ;
You can’t perform that action at this time.
0 commit comments