diff options
| author | 2018-05-01 11:36:13 +0100 | |
|---|---|---|
| committer | 2018-05-01 11:36:13 +0100 | |
| commit | d5be0951fb8f332ad9dc27caf25e64ac255eedc8 (patch) | |
| tree | 5b6b1c87dfc64da7783b04c68ac184dc158934a0 /scripts | |
| parent | [Wiki] Fix image spacing (diff) | |
| parent | restructure docker (diff) | |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# static/style.css
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 |