drone: deploy

master
pictuga 2021-12-14 15:10:46 +00:00
parent 7cdcbd23e1
commit 7885ab48df
1 changed files with 34 additions and 0 deletions

View File

@ -60,3 +60,37 @@ trigger:
depends_on:
- test
---
kind: pipeline
type: ssh
name: prod
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: install
commands:
- sudo pip install --upgrade morss[full]
- name: reload
commands:
- pid=$(sudo pidof 'gunicorn: master [morss]')
- sudo kill -s USR2 $pid
- sudo kill -s WINCH $pid
- sudo kill -s TERM $pid
trigger:
branch:
- master
event:
- push
depends_on:
- python