Skip to content

Commit 307e8bd

Browse files
committed
feat: add ci
Signed-off-by: Woshiluo Luo <[email protected]>
1 parent 83b8e8e commit 307e8bd

File tree

3 files changed

+8333
-1
lines changed

3 files changed

+8333
-1
lines changed

.github/workflows/ci.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
persist-credentials: false
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: "22"
20+
21+
- name: Install and Build
22+
run: |
23+
yarn install
24+
yarn build
25+
26+
- name: Upload to Deploy Server
27+
uses: appleboy/scp-action@master
28+
with:
29+
host: ${{ secrets.SERVER_HOST }}
30+
username: ${{ secrets.SERVER_USERNAME }}
31+
key: ${{ secrets.SERVER_KEY }}
32+
port: ${{ secrets.SERVER_PORT }}
33+
source: './dist/*'
34+
target: '/var/www/html'
35+
overwrite: true
36+
strip_components: 1

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"react-popper": "^2.2.5",
3434
"react-router-dom": "^5.0.0",
3535
"sass": "^1.63.4",
36-
"sass-loader": "^7.1.0"
36+
"sass-loader": "^7.1.0",
37+
"vue-template-compiler": "^2.7.16"
3738
}
3839
}

0 commit comments

Comments
 (0)