1
- name : Auto Deploy Site
2
-
3
- on :
4
- workflow_dispatch :
5
-
6
- permissions :
7
- contents : read
8
- pages : write
9
- id-token : write
10
-
11
- # Allow one concurrent deployment
12
- concurrency :
13
- group : pages
14
- cancel-in-progress : true
15
-
16
- jobs :
17
- # Build job
18
- build :
19
- runs-on : ubuntu-latest
20
- permissions :
21
- contents : write
22
- steps :
23
- - name : Checkout
24
- uses : actions/checkout@v3
25
- - name : Setup pnpm
26
- uses : pnpm/action-setup@v3
27
- with :
28
- version : 9
29
- - name : Install deps
30
- run : pnpm i --no-frozen-lockfile
31
- - name : Prepare site
32
- run : pnpm pre
33
- - name : Re Install deps
34
- run : pnpm i --no-frozen-lockfile
35
- - name : Build site
36
- run : export NODE_OPTIONS="--max-old-space-size=8192" && pnpm build
37
- - name : Setup Pages
38
- uses : actions/configure-pages@v5
39
- - name : Build with Jekyll
40
- uses : actions/jekyll-build-pages@v1
41
- with :
42
- source : ./sites/dist
43
- destination : ./_site
44
- - name : Repair build artifact
45
- run : |
46
- sudo chmod -R 777 ./_site
47
- cp ./sites/dist/assets/_commonjsHelpers*.js ./_site/assets
48
- cp ./_site/index.html ./_site/404.html
49
- sed -i 's/\/static/\/tiny-vue-web-doc\/static/' ./_site/static/js/design-common.js
50
- sh ./sites/cp-component-md.sh
51
- - name : Upload artifact
52
- uses : actions/upload-pages-artifact@v3
53
-
54
- # Deployment job
55
- deploy :
56
- runs-on : ubuntu-latest
57
- needs : build
58
- steps :
59
- - name : Deploy to GitHub Pages
60
- id : deployment
61
- uses : actions/deploy-pages@v4
62
- environment :
63
- name : github-pages
64
- url : ${{ steps.deployment.outputs.page_url }}
1
+ name : Auto Deploy Site
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency :
16
+ group : pages
17
+ cancel-in-progress : true
18
+
19
+ jobs :
20
+ # Build job
21
+ build :
22
+ runs-on : ubuntu-latest
23
+ permissions :
24
+ contents : write
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v3
28
+ - name : Setup pnpm
29
+ uses : pnpm/action-setup@v3
30
+ with :
31
+ version : 9
32
+ - name : Install deps
33
+ run : pnpm i --no-frozen-lockfile
34
+ - name : Prepare site
35
+ run : pnpm pre
36
+ - name : Re Install deps
37
+ run : pnpm i --no-frozen-lockfile
38
+ - name : Build site
39
+ run : export NODE_OPTIONS="--max-old-space-size=8192" && pnpm build
40
+ - name : Setup Pages
41
+ uses : actions/configure-pages@v5
42
+ - name : Build with Jekyll
43
+ uses : actions/jekyll-build-pages@v1
44
+ with :
45
+ source : ./sites/dist
46
+ destination : ./_site
47
+ - name : Repair build artifact
48
+ run : |
49
+ sudo chmod -R 777 ./_site
50
+ cp ./sites/dist/assets/_commonjsHelpers*.js ./_site/assets
51
+ cp ./_site/index.html ./_site/404.html
52
+ sed -i 's/\/static/\/tiny-vue-web-doc\/static/' ./_site/static/js/design-common.js
53
+ sh ./sites/cp-component-md.sh
54
+ - name : Upload artifact
55
+ uses : actions/upload-pages-artifact@v3
56
+
57
+ # Deployment job
58
+ deploy :
59
+ runs-on : ubuntu-latest
60
+ needs : build
61
+ steps :
62
+ - name : Deploy to GitHub Pages
63
+ id : deployment
64
+ uses : actions/deploy-pages@v4
65
+ environment :
66
+ name : github-pages
67
+ url : ${{ steps.deployment.outputs.page_url }}
0 commit comments