Pārlūkot izejas kodu

update drone for live deployment

Karathan 7 gadus atpakaļ
vecāks
revīzija
8f4c18eb55
1 mainītis faili ar 21 papildinājumiem un 1 dzēšanām
  1. 21
    1
      .drone.yml

+ 21
- 1
.drone.yml Parādīt failu

4
     commands:
4
     commands:
5
       - mv content/_meta-staging.md content/_meta.md
5
       - mv content/_meta-staging.md content/_meta.md
6
       - mv config/config-staging.yml config/config.yml
6
       - mv config/config-staging.yml config/config.yml
7
+    when:
8
+      branch: staging
7
 
9
 
8
   deploy_staging:
10
   deploy_staging:
9
     image: appleboy/drone-scp
11
     image: appleboy/drone-scp
12
     target: "/var/www/blog-staging"
14
     target: "/var/www/blog-staging"
13
     source: "*"
15
     source: "*"
14
     secrets: [ ssh_password, ssh_username ]
16
     secrets: [ ssh_password, ssh_username ]
17
+    when:
18
+      branch: staging
15
 
19
 
16
-branches: [ staging ]
20
+  modify_production:
21
+    image: debian:stretch
22
+    commands:
23
+      - mv content/_meta-live.md content/_meta.md
24
+      - mv config/config-live.yml content/config.yml
25
+    when:
26
+      branch: master
27
+
28
+  deploy_staging:
29
+    image: appleboy/drone-scp
30
+    host: gitlab.karathan.at
31
+    port: 22
32
+    target: "/var/www/blog"
33
+    source: "*"
34
+    secrets: [ ssh_password, ssh_username ]
35
+    when:
36
+      branch: master