diff options
author | 2018-05-01 11:36:13 +0100 | |
---|---|---|
committer | 2018-05-01 11:36:13 +0100 | |
commit | d5be0951fb8f332ad9dc27caf25e64ac255eedc8 (patch) | |
tree | 5b6b1c87dfc64da7783b04c68ac184dc158934a0 /scripts/deploy.py | |
parent | [Wiki] Fix image spacing (diff) | |
parent | restructure docker (diff) |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# static/style.css
Diffstat (limited to 'scripts/deploy.py')
-rw-r--r-- | scripts/deploy.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/deploy.py b/scripts/deploy.py new file mode 100644 index 00000000..20d8edd5 --- /dev/null +++ b/scripts/deploy.py @@ -0,0 +1,20 @@ +import os + +import requests + +branch = os.environ.get("TRAVIS_BRANCH") +url = os.environ.get("AUTODEPLOY_WEBHOOK") +token = os.environ.get("AUTODEPLOY_TOKEN") + +PR = os.environ.get("TRAVIS_PULL_REQUEST") + +print('branch:', branch) +print('is_pr:', PR) + +if branch == 'master' and PR == 'false': + print("deploying..") + result = requests.get(url=url, headers={'token': token}) + print(result.text) + +else: + print("skipping deploy") |