Skip to content

Commit

Permalink
feat(temp-react): build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yucccc committed Nov 1, 2022
1 parent 21a3414 commit ac82d7a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
23 changes: 23 additions & 0 deletions template/react-component-library/.github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Storybook
on:
push:
branches:
- main # if any push happens on branch `main`, run this workflow. You could also add `paths` to detect changes in specific folder

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install and Build
run: |
npm ci
npm run build-storybook
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: storybook-static # npm run build-storybook输出的文件夹
7 changes: 6 additions & 1 deletion template/react-component-library/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ module.exports = {
},
"features": {
"storyStoreV7": true
}
},
async viteFinal(config) {
// base需要修改为你项目的目录路径
config.base = '/react-component-library-template/'
return config
},
}

0 comments on commit ac82d7a

Please sign in to comment.