-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
44 lines (40 loc) · 1.06 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
pipeline:
frontend:
image: node:10
commands:
- npm install
- npm run generate
lint:
image: node:10
commands:
- npm run lint
deploy_review:
image: drillster/drone-rsync
secrets: [ rsync_key, rsync_user ]
hosts:
- ci.core.uconn.edu
source: ./dist/*
target: ~/squaredlabs-${DRONE_BUILD_NUMBER}
delete: true
script:
- TARGET_PATH=~/squaredlabs-${DRONE_BUILD_NUMBER}
- DEPLOY_PATH=/srv/nginx/pages/ci/squaredlabs/${DRONE_BRANCH}/public
- mkdir -p $DEPLOY_PATH
- rsync -az --delete $TARGET_PATH/* $DEPLOY_PATH
- rm -rf $TARGET_PATH
deploy_prod:
image: drillster/drone-rsync
secrets: [ rsync_key, rsync_user ]
hosts:
- squaredlabs.uconn.edu
source: ./dist/*
target: ~/squaredlabs-${DRONE_BUILD_NUMBER}
delete: true
when:
branch:
- master
script:
- TARGET_PATH=~/squaredlabs-${DRONE_BUILD_NUMBER}
- DEPLOY_PATH=/var/www/squaredlabs
- rsync -az --delete $TARGET_PATH/* $DEPLOY_PATH
- rm -rf $TARGET_PATH