diff --git a/app/config/sculpin_site_prod.yml b/app/config/sculpin_site_prod.yml index 039f0d8d..b6a4a1c3 100644 --- a/app/config/sculpin_site_prod.yml +++ b/app/config/sculpin_site_prod.yml @@ -1,3 +1,4 @@ +--- imports: - sculpin_site.yml url: https://www.oliverdavies.uk diff --git a/app/config/sculpin_site_staging.yml b/app/config/sculpin_site_staging.yml new file mode 100644 index 00000000..5b6de5ff --- /dev/null +++ b/app/config/sculpin_site_staging.yml @@ -0,0 +1,4 @@ +--- +imports: + - sculpin_site.yml +url: http://oliverdavies.s.oliverdavies.uk diff --git a/publish-staging.sh b/publish-staging.sh new file mode 100755 index 00000000..7a7a5e64 --- /dev/null +++ b/publish-staging.sh @@ -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 diff --git a/publish.sh b/publish.sh index 2ce9c714..8c5632dd 100755 --- a/publish.sh +++ b/publish.sh @@ -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