-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.drone.yml
46 lines (46 loc) · 1.25 KB
/
.drone.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
kind: pipeline
type: docker
name: default
steps:
- name: build
image: node
commands:
- npm config set registry https://registry.npmmirror.com/
- npm install --save --legacy-peer-deps
- npm run build
- cp package.json ./dist
- cp package-lock.json ./dist
- cp ecosystem.config.js ./dist
- name: upload
image: appleboy/drone-scp
settings:
host:
from_secret: host
username:
from_secret: username
key:
from_secret: ssh_key
port: 22
command_timeout: 2m
target: /tmp/forum
source:
- ./dist
- name: deploy
image: appleboy/drone-ssh
environment:
DEPLOY_PATH:
from_secret: deploy_path
settings:
host:
from_secret: host
username:
from_secret: username
key:
from_secret: ssh_key
port: 22
command_timeout: 2m
envs: [DEPLOY_PATH]
script:
- rm -rf $${DEPLOY_PATH}
- mv /tmp/forum/dist $${DEPLOY_PATH}
- cd $${DEPLOY_PATH} && $HOME/.n/bin/npm install --save --legacy-peer-deps