aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/deploy.py b/deploy.py
index 4e45b1f0..189b5f0c 100644
--- a/deploy.py
+++ b/deploy.py
@@ -7,9 +7,14 @@ branch = os.environ.get("TRAVIS_BRANCH")
url = os.environ.get("AUTODEPLOY_WEBHOOK")
token = os.environ.get("AUTODEPLOY_TOKEN")
-if branch == 'master':
+PR = os.environ.get("TRAVIS_PULL_REQUEST")
+
+print('branch:', branch)
+print('is_pr:', PR)
+
+if branch == 'master' and PR == 'false':
print("deploying..")
- result = requests.post(url=url, headers={'token': token})
+ result = requests.get(url=url, headers={'token': token})
print(result.text)
else: