Explorar el Código

:gear: trying push-deploy

tags/0.0.3^2
J hace 3 años
padre
commit
6df6ea1b61
Se han modificado 1 ficheros con 36 adiciones y 0 borrados
  1. 36
    0
      .drone.yml

+ 36
- 0
.drone.yml Ver fichero

@@ -1,4 +1,10 @@
1 1
 ---
2
+################
3
+#    SECRETS   #
4
+################
5
+
6
+# push_deploy_key: id_rsa from DRONE host machine
7
+---
2 8
 #################
3 9
 # Frontend Test #
4 10
 #################
@@ -86,3 +92,33 @@ volumes:
86 92
     - name: frontend_build
87 93
       host:
88 94
           path: /tmp/cache/drone/frontend/build
95
+---
96
+#####################
97
+# Deploy to Staging #
98
+#####################
99
+kind: pipeline
100
+name: deploy
101
+depends_on:
102
+    # Must run after the first pipeline
103
+    - frontend_run_build
104
+    - backend_run_build
105
+trigger:
106
+    status:
107
+        # Only runs if the first pipeline was fully successful
108
+        - success
109
+        # Only runs on the master branch
110
+    branch:
111
+        - master
112
+
113
+steps:
114
+    # post-receive hook
115
+    - name: push commit
116
+      image: appleboy/drone-git-push:0.2.0-linux-amd64
117
+      settings:
118
+          branch: master
119
+          remote: maeda@165.232.128.85:/opt/staging/siimee.git
120
+          remote_name: staging
121
+          force: true
122
+          ssh_key:
123
+              # !: id_rsa from DRONE machine
124
+              from_secret: push_deploy_key

Loading…
Cancelar
Guardar