obolus/.drone.yml

50 lines
1015 B
YAML
Raw Permalink Normal View History

2019-05-22 18:41:12 +00:00
kind: pipeline
name: default
steps:
- name: build-www
image: node:12-alpine
pull: always
commands:
- cd www
- npm i
- npm run build
- name: build-api
image: node:12-alpine
pull: always
commands:
- cd api
- npm i
- npm run build
- rm -r node_modules package-lock.json
- npm i --only=prod
2019-05-22 18:47:18 +00:00
2019-05-23 07:42:46 +00:00
- name: deploy
image: cupcakearmy/drone-deploy
pull: always
settings:
host: nicco.io
user: root
2019-05-27 18:18:45 +00:00
key:
from_secret: ssh_key
2019-05-23 07:42:46 +00:00
port: 1312
target: /srv/web/obolus
sources:
- ./api/dist
- ./api/node_modules
2019-05-23 07:51:08 +00:00
- ./api/package.json
2019-05-23 07:42:46 +00:00
- ./www/.next
- ./www/server.js
- ./www/node_modules
2019-05-23 08:06:47 +00:00
- ./www/static
2019-05-23 07:51:08 +00:00
- ./www/package.json
2019-05-23 07:42:46 +00:00
- ./docker-compose.prod.yml
commands:
2019-05-23 08:22:11 +00:00
- docker-compose -f docker-compose.prod.yml down
- docker-compose -f docker-compose.prod.yml up -d
2019-05-23 07:42:46 +00:00
when:
event: push
branch: master