aboutsummaryrefslogtreecommitdiffstats
path: root/deploy.py
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-02-07 22:55:42 +0100
committerGravatar Gareth Coles <[email protected]>2018-02-07 21:55:42 +0000
commit85afb2dc4159a3eaae5c21289efdd2eb97685fc3 (patch)
tree03d87ecd20e0406bbe848b8281fa15109bfa6f33 /deploy.py
parentTravis master deploy (#3) (diff)
only deploy on master branch (#4)
* adds python script to handle branch condition * satisfy snekchek * snekchekd to death
Diffstat (limited to 'deploy.py')
-rw-r--r--deploy.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/deploy.py b/deploy.py
new file mode 100644
index 00000000..4e45b1f0
--- /dev/null
+++ b/deploy.py
@@ -0,0 +1,16 @@
+import os
+
+import requests
+
+
+branch = os.environ.get("TRAVIS_BRANCH")
+url = os.environ.get("AUTODEPLOY_WEBHOOK")
+token = os.environ.get("AUTODEPLOY_TOKEN")
+
+if branch == 'master':
+ print("deploying..")
+ result = requests.post(url=url, headers={'token': token})
+ print(result.text)
+
+else:
+ print("skipping deploy")