-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.37 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Deploy to Github Pages
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: './table-component/package-lock.json'
- name: Install and Build
run: |
npm install
cd ./table-component
npm run build
env:
NODE_ENV: production
- name: Copy build files
run: |
mkdir -p ../css ../js
cp ./table-component/dist/css/app*.css ../css/app.css
cp ./table-component/dist/css/chunk-vendors*.css ../css/chunk-vendors.css
cp ./table-component/dist/js/app*.js ../js/app.js
cp ./table-component/dist/js/chunk-vendors*.js ../js/chunk-vendors.js
- name: Prepare documentation
run: |
mkdir gh-pages
touch gh-pages/.nojekyll
mv site/* ./gh-pages/
- name: Deploy documentation.
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
force: true
folder: gh-pages