From b1eaeb928be9b4b8d9c479c5e3c605e17c8055e7 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 20 Jul 2018 13:06:10 +0200 Subject: [PATCH] Implemend different build environments --- .drone.yml | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index 972e018..9f1d35f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,45 +1,47 @@ pipeline: - build: + build-dev: image: cbrgm/drone-hugo:latest buildDrafts: true buildFuture: true buildExpired: true validate: true url: https://staging.vbrandl.net - compress: - image: alpine:latest - commands: - - apk --no-cache update - - apk add make - - make -C public/ -f ../Makefile - deploy: - image: drillster/drone-rsync - hosts: [ "vbrandl.net" ] - target: /var/www/staging.vbrandl.net - source: public/* - user: hugo - secrets: [ rsync_key ] -branches: develop + when: + branch: develop -pipeline: - build: + build-prod: image: cbrgm/drone-hugo:latest buildDrafts: false buildFuture: false buildExpired: false validate: true url: https://www.vbrandl.net + when: + branch: master + compress: image: alpine:latest commands: - apk --no-cache update - apk add make - make -C public/ -f ../Makefile - deploy: + + deploy-dev: + image: drillster/drone-rsync + hosts: [ "vbrandl.net" ] + target: /var/www/staging.vbrandl.net + source: public/* + user: hugo + secrets: [ rsync_key ] + when: + branch: develop + + deploy-prod: image: drillster/drone-rsync hosts: [ "vbrandl.net" ] target: /var/www/vbrandl.net source: public/* user: hugo secrets: [ rsync_key ] -branches: master + when: + branch: master