-
-
Notifications
You must be signed in to change notification settings - Fork 208
34 lines (34 loc) · 1.13 KB
/
develop.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
name: 部署猫步简历到开发服务器上
on:
#监听push操作
pull_request:
branches:
# main分支,你也可以改成其他分支
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm install -g pnpm
run: npm install -g pnpm
- name: pnpm install
run: pnpm install
- name: npm run build:dev
env:
NODE_OPTIONS: '--max_old_space_size=4096'
run: export NODE_OPTIONS="--max_old_space_size=4096" && npm run build:dev
# 命名这个任务为发布Deploy
- name: Deploy
# 因为构建之后,需要把代码上传到服务器上,所以需要连接到ssh,并且做一个拷贝操作
uses: cross-the-world/scp-pipeline@master
env:
WELCOME: 'ssh scp ssh pipelines'
LASTSSH: 'Doing something after copying'
with:
host: ${{ secrets.USER_HOST }}
user: ${{ secrets.USER_NAME }}
pass: ${{ secrets.USER_PASS }}
connect_timeout: 10s
local: './dist/*'
remote: /www/wwwroot/huajian.maobucv.com/develop/dist