From 5eae8a89785798519aec66fb708389f6e5ea0327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 4 Dec 2018 00:18:49 +0100 Subject: [PATCH] Configure Travis CI conditional builds and add placeholder deployment. This commit should deploy to * `production` if on branch master AND tagged * `staging` if on branch master * `custom` if tagged The custom deployment is inspired by https://zeit.co/now and should deploy features for demonstration purposes before merging into master. It will happen that we trigger multiple deployments with this workflow: If we deploy to production, that is going to deploy to a custom environment and to staging. But I think this is not too problematic. What do you think @appinteractive @mcwimpy? --- .travis.yml | 16 ++++++++++++++++ scripts/deploy.sh | 4 ++++ 2 files changed, 20 insertions(+) create mode 100755 scripts/deploy.sh diff --git a/.travis.yml b/.travis.yml index 322137700..adfd185f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,3 +33,19 @@ after_failure: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - chmod +x send.sh - ./send.sh failure $WEBHOOK_URL + +deploy: + - provider: script + script: scripts/deploy.sh nitro.human-connection.org + on: + branch: master + tag: true + - provider: script + script: scripts/deploy.sh nitro-staging.human-connection.org + on: + branch: master + - provider: script + script: scripts/deploy.sh "nitro-$(git rev-parse --short HEAD).human-connection.org" + on: + tag: true + all_branches: true diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 000000000..b66b63a77 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "See me deployed at $1 :)" +