aboutsummaryrefslogtreecommitdiffstats
path: root/deploy.py
diff options
context:
space:
mode:
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")