blob: 853d2b0c5e08c6d34236bb6aa10841037929d86a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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")
|