diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..6a1fc3126ca54b8cc450eab706ffe6f784ac9d46 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +ssh debian@hickory.sfconservancy.org 'bash -s' << EOF +set -x # Show output +set -e # Abort on failure +cd /var/www/website +sudo -u www-data git pull +sudo -u www-data /var/www/venv-website/bin/python manage.py check +sudo -u www-data /var/www/venv-website/bin/python manage.py migrate +sudo -u www-data /var/www/venv-website/bin/python manage.py collectstatic -v0 --noinput --link +sudo systemctl restart apache2 +curl --silent --head https://sfconservancy.org | grep --perl-regexp "^HTTP/.+ 200" +EOF