Updated publish scripts

This commit is contained in:
Oliver Davies 2015-12-29 08:43:30 +00:00
parent 64597ddddb
commit 4fe7fe624f
4 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,4 @@
---
imports:
- sculpin_site.yml
url: https://www.oliverdavies.uk

View file

@ -0,0 +1,4 @@
---
imports:
- sculpin_site.yml
url: http://oliverdavies.s.oliverdavies.uk

12
publish-staging.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
ENV=staging
DEPLOY_USER=deployment
DEPLOY_HOST=oliverdavies.s.oliverdavies.uk
DEPLOY_PATH=/var/www/oliverdavies/public
./vendor/bin/sculpin generate --env=${ENV} --clean --no-interaction
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi
rsync -av --delete output_${ENV}/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}
if [ $? -ne 0 ]; then echo "Could not publish the site"; exit 1; fi

View file

@ -1,7 +1,12 @@
#!/bin/bash
./vendor/bin/sculpin generate --env=prod --clean --no-interaction
ENV=prod
DEPLOY_USER=deployment
DEPLOY_HOST=www.oliverdavies.uk
DEPLOY_PATH=/var/www/oliverdavies/site
./vendor/bin/sculpin generate --env=${ENV} --clean --no-interaction
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi
rsync -av --delete output_prod/ deployment@www.oliverdavies.uk:/var/www/vhosts/oliverdavies/public
rsync -av --delete output_${ENV}/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}
if [ $? -ne 0 ]; then echo "Could not publish the site"; exit 1; fi