From 7078778d3984512bfbc70675ab066731f6e192cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=A4?= =?UTF-8?q?=D0=B5=D0=B4=D0=BE=D1=80=D0=BE=D0=B2?= Date: Sun, 3 Apr 2022 17:08:13 +0700 Subject: [PATCH] add drone --- .drone.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 32c3679..ceea38a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,9 +7,43 @@ steps: image: golang commands: - go build -o butler_tg_bot main.go - - ls - + - name: scp + image: appleboy/drone-scp + settings: + host: + from_secret: ssh_ip + username: + from_secret: ssh_login + password: + from_secret: ssh_pass + port: + from_secret: ssh_port + target: bots + source: + - butler_tg_bot + rm: true + + - name: deploy + image: appleboy/drone-ssh + environment: + TOKEN: + from_secret: bot_token + settings: + host: + from_secret: ssh_ip + username: + from_secret: ssh_login + password: + from_secret: ssh_pass + port: + from_secret: ssh_port + envs: [ TOKEN ] + script: + - cd bots + - pkill butler_tg_bot + - ./butler_tg_bot --token=$${TOKEN} & + trigger: event: - tag