From 8cc8c1128b093b09d84e64eede416402b8918e9f Mon Sep 17 00:00:00 2001
From: Yarmo Mackenbach <yarmo@yarmo.eu>
Date: Sun, 9 Aug 2020 15:02:29 +0200
Subject: [PATCH] Dbug drone

---
 .drone.yml | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/.drone.yml b/.drone.yml
index 606f880..c4a9303 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -14,6 +14,41 @@ steps:
           repo: keyoxide/keyoxide
           tags: stable
 
+trigger:
+    branch:
+        - main
+    event:
+        - push
+
+---
+
+kind: pipeline
+type: exec
+name: deploy-stable
+
+steps:
+    - name: pull docker container
+      commands:
+          - docker pull keyoxide/keyoxide:stable
+    - name: stop and remove existing docker container
+      commands:
+          - docker stop keyoxide || true && docker rm keyoxide || true
+    - name: run new docker container
+      environment:
+          TWITTER_API_AUTH:
+              from_secret: twitter_api_auth
+      commands:
+          - docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide -h keyoxide --network dc_web keyoxide/keyoxide:stable
+
+trigger:
+    branch:
+        - main
+    event:
+        - push
+
+depends_on:
+    - build-stable-container
+
 ---
 
 kind: pipeline
@@ -30,6 +65,12 @@ steps:
           repo: keyoxide/keyoxide
           tags: dev
 
+trigger:
+    branch:
+        - dev
+    event:
+        - push
+
 ---
 
 kind: pipeline