website/bin/deploy.sh
Ben Sturmfels aa26e2f7f0
Fix mistaken rename
I meant to rename the deploy script, not the deploy directory.
2024-02-27 10:23:18 +11:00

14 lines
516 B
Bash
Executable file

#!/bin/sh
git push
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