File tree 1 file changed +29
-14
lines changed
1 file changed +29
-14
lines changed Original file line number Diff line number Diff line change 1
- name : Auto-deployment of Documentation
1
+ name : Deploy to Github Pages
2
2
on :
3
3
push :
4
- branches : [main]
4
+ branches : [ main ]
5
+ pull_request :
6
+ branches : [ main ]
7
+ workflow_dispatch :
8
+
5
9
jobs :
6
- build-docs :
10
+ build-and-deploy :
7
11
runs-on : ubuntu-latest
8
12
steps :
9
13
- name : Checkout
10
- uses : actions/checkout@v3.0.2
14
+ uses : actions/checkout@v3
11
15
with :
12
- fetch-depth : 0 # otherwise, you will failed to push refs to dest repo
16
+ fetch-depth : 0
13
17
14
- - name : Set up Python 3.
15
- uses : actions/setup-python @v3
18
+ - name : Setup Node.js
19
+ uses : actions/setup-node @v3
16
20
with :
17
- python-version : 3.9
21
+ node-version : ' 16'
22
+ cache : ' npm'
23
+ cache-dependency-path : ' ./table-component/package-lock.json'
18
24
19
- - name : Install Poetry.
20
- uses : snok/install-poetry@v1.3.1
25
+ - name : Install and Build
26
+ run : |
27
+ npm install
28
+ cd ./table-component
29
+ npm run build
30
+ env :
31
+ NODE_ENV : production
21
32
22
- - name : Install dependencies.
33
+ - name : Copy build files
23
34
run : |
24
- poetry install --with docs
35
+ mkdir -p ../css ../js
36
+ cp ./table-component/dist/css/app*.css ../css/app.css
37
+ cp ./table-component/dist/css/chunk-vendors*.css ../css/chunk-vendors.css
38
+ cp ./table-component/dist/js/app*.js ../js/app.js
39
+ cp ./table-component/dist/js/chunk-vendors*.js ../js/chunk-vendors.js
25
40
26
- - name : Build documentation.
41
+ - name : Prepare documentation
27
42
run : |
28
43
mkdir gh-pages
29
44
touch gh-pages/.nojekyll
35
50
with :
36
51
branch : gh-pages
37
52
force : true
38
- folder : gh-pages
53
+ folder : gh-pages
You can’t perform that action at this time.
0 commit comments