diff options
Diffstat (limited to '')
| -rw-r--r-- | scripts/deploy.py (renamed from deploy.py) | 0 | ||||
| -rw-r--r-- | scripts/deploy.sh | 18 | ||||
| -rw-r--r-- | scripts/vagrant_bootstrap.sh (renamed from Vagrant_bootstrap.sh) | 0 |
3 files changed, 18 insertions, 0 deletions
diff --git a/deploy.py b/scripts/deploy.py index 20d8edd5..20d8edd5 100644 --- a/deploy.py +++ b/scripts/deploy.py diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 00000000..96723aa6 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Build and deploy on master branch +if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then + echo "Connecting to docker hub" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + echo "Building image" + docker build -t pythondiscord/site:latest -f docker/Dockerfile . + + echo "Pushing image" + docker push pythondiscord/site:latest + + echo "Deploying container" + pipenv run python scripts/deploy.py +else + echo "Skipping deploy" +fi diff --git a/Vagrant_bootstrap.sh b/scripts/vagrant_bootstrap.sh index 307107d4..307107d4 100644 --- a/Vagrant_bootstrap.sh +++ b/scripts/vagrant_bootstrap.sh |