diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/deploy.py | 20 | ||||
-rw-r--r-- | scripts/deploy.sh | 3 |
2 files changed, 2 insertions, 21 deletions
diff --git a/scripts/deploy.py b/scripts/deploy.py deleted file mode 100644 index 20d8edd5..00000000 --- a/scripts/deploy.py +++ /dev/null @@ -1,20 +0,0 @@ -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") diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 96723aa6..d1ac047d 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Build and deploy on master branch if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then @@ -12,7 +13,7 @@ if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then docker push pythondiscord/site:latest echo "Deploying container" - pipenv run python scripts/deploy.py + curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_URL else echo "Skipping deploy" fi |