aboutsummaryrefslogtreecommitdiffstats
path: root/deploy.py
blob: 4e45b1f061c5cb47ddfc69fa1716b7674d8aa461 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")