File tree 8 files changed +52
-2
lines changed
8 files changed +52
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy website
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' *'
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ jobs :
12
+ build-and-deploy :
13
+ runs-on : ubuntu-20.04
14
+ strategy :
15
+ matrix :
16
+ node-version : [16]
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ - uses : pnpm/action-setup@v2
20
+ with :
21
+ version : 7
22
+ - name : Use Node.js ${{ matrix.node-version }}
23
+ uses : actions/setup-node@v3
24
+ with :
25
+ node-version : ${{ matrix.node-version }}
26
+ cache : ' pnpm'
27
+ - name : Install dependencies
28
+ run : pnpm install
29
+
30
+ - name : build Docs
31
+ run : pnpm run build:docs
32
+
33
+ - name : Deploy to GitHub Pages
34
+ uses : peaceiris/actions-gh-pages@v3
35
+ with :
36
+ github_token : ${{ secrets.GITHUB_TOKEN }}
37
+ publish_dir : ./.doc
38
+ force_orphan : true
39
+ user_name : ' github-actions[bot]'
40
+ user_email : ' github-actions[bot]@users.noreply.github.com'
Original file line number Diff line number Diff line change 30
30
es
31
31
lib
32
32
.umi
33
+ .doc
Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ import type { IConfig } from 'dumi'
3
3
import { menus } from './menus'
4
4
import { navs } from './navs'
5
5
6
+ const basePath = process . env . GITHUB_ACTIONS ? '/react-ui-library/' : '/' ;
7
+ const publicPath = process . env . GITHUB_ACTIONS ? '/react-ui-library/' : '/' ;
8
+
6
9
const resolvePath = ( dir : string ) => path . resolve ( process . cwd ( ) , dir )
7
10
8
11
const config : IConfig = {
9
- base : '/' ,
10
- publicPath : '/' ,
12
+ base : basePath ,
13
+ publicPath,
11
14
exportStatic : { } ,
15
+ outputPath : '.doc' ,
12
16
nodeModulesTransform : {
13
17
type : 'none' ,
14
18
exclude : [ ] ,
Original file line number Diff line number Diff line change 12
12
],
13
13
"scripts" : {
14
14
"build" : " gulp" ,
15
+ "prepublishOnly" : " pnpm run build" ,
15
16
"release" : " bumpp --tag @template-pro/desktop-ui@%s --all --no-verify && pnpm publish"
16
17
},
17
18
"peerDependencies" : {
Original file line number Diff line number Diff line change 18
18
"clean" : " gulp clean" ,
19
19
"build:svg" : " gulp copy && svgr --template scripts/buildIconTemplate.js --typescript --out-dir src temp" ,
20
20
"build" : " pnpm run clean && pnpm run build:svg && gulp" ,
21
+ "prepublishOnly" : " pnpm run build" ,
21
22
"release" : " bumpp --tag @template-pro/icons@%s --all --no-verify && pnpm publish"
22
23
},
23
24
"publishConfig" : {
Original file line number Diff line number Diff line change 18
18
],
19
19
"scripts" : {
20
20
"build" : " gulp" ,
21
+ "prepublishOnly" : " pnpm run build" ,
21
22
"release" : " bumpp --tag @template-pro/mobile-ui@%s --all --no-verify && pnpm publish"
22
23
},
23
24
"peerDependencies" : {
Original file line number Diff line number Diff line change 13
13
],
14
14
"scripts" : {
15
15
"build" : " gulp" ,
16
+ "prepublishOnly" : " pnpm run build" ,
16
17
"release" : " bumpp --tag @template-pro/rc-ui@%s --all --no-verify && pnpm publish"
17
18
},
18
19
"peerDependencies" : {
Original file line number Diff line number Diff line change 16
16
],
17
17
"scripts" : {
18
18
"build" : " gulp" ,
19
+ "prepublishOnly" : " pnpm run build" ,
19
20
"release" : " bumpp --tag @template-pro/utils@%s --all --no-verify && pnpm publish"
20
21
},
21
22
"publishConfig" : {
You can’t perform that action at this time.
0 commit comments