-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 969 Bytes
/
prod.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
name: prod
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# 切代码到 runner
- name: Checkout repository
uses: actions/checkout@v1
with:
submodules: recursive
# 下载 git submodule
- name: Update submodules
run: |
git submodule update --remote
# 使用 node 16.5.0
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: "16.5.0"
# npm install
- name: Install npm dependencies
run: npm install
- name: Run build task
run: npm run build
- name: copy file via ssh key
uses: appleboy/scp-action@master
with:
source: "web-node/*"
host: ${{ secrets.HOST }}
target: "/usr/src/zhoubichuan/prod/"
port: ${{ secrets.PORT }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}