-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
53 lines (52 loc) · 1.21 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
47
48
49
50
51
52
53
kind: pipeline
type: docker
name: default
steps:
- name: Build & Pack
image: node:14-alpine
commands:
- cd ./@frontend
- npm install
- npm run build
- name: Secure Transfer
image: appleboy/drone-scp
settings:
host:
from_secret: vps_host
user:
from_secret: vps_username
key:
from_secret: vps_private_key
port: 22
command_timeout: 2m
target: /home/maintainer/web
source:
- ./@frontend/dist
- ./@backend
- ./nginx.conf
- name: Remotly restart service
image: appleboy/drone-ssh
settings:
host:
from_secret: vps_host
user:
from_secret: vps_username
key:
from_secret: vps_private_key
port: 22
command_timeout: 2m
script:
- cd /opt/web
- sudo cp -rf /home/maintainer/web/* .
- sudo docker-compose down
- sudo rm -rf frontend
- sudo rm -rf backend
- sudo cp -r ./@frontend/dist frontend
- sudo cp -r ./@backend backend
- sudo rm -rf @frontend
- sudo rm -rf @backend
- sudo docker-compose up --build --force-recreate -d
trigger:
branch:
- develop
- master