diff options
author | 2018-02-08 16:01:20 +0000 | |
---|---|---|
committer | 2018-02-08 16:01:20 +0000 | |
commit | 428eb9a6afb85fca51e87f6d16a1044a5fa24bf8 (patch) | |
tree | ee991943fd2bb05a574d8ae035fb6fc5be3f8c52 /deploy.py | |
parent | Pffft (diff) | |
parent | Travis deploy on master (#5) (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'deploy.py')
-rw-r--r-- | deploy.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deploy.py b/deploy.py new file mode 100644 index 00000000..189b5f0c --- /dev/null +++ b/deploy.py @@ -0,0 +1,21 @@ +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") |