2024-02-23 04:35:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-03-20 03:18:59 +00:00
|
|
|
set -e # Abort on failure
|
|
|
|
|
2024-02-26 22:43:07 +00:00
|
|
|
git push
|
2024-02-23 04:35:55 +00:00
|
|
|
ssh debian@hickory.sfconservancy.org 'bash -s' << EOF
|
|
|
|
set -x # Show output
|
2024-03-20 03:18:59 +00:00
|
|
|
set -e
|
2024-02-23 04:35:55 +00:00
|
|
|
cd /var/www/website
|
|
|
|
sudo -u www-data git pull
|
2024-05-06 23:48:36 +00:00
|
|
|
sudo chown www-data:www-data .
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 -m pip install -r requirements.txt
|
2024-03-20 03:18:46 +00:00
|
|
|
export DJANGO_SETTINGS_MODULE=conservancy.settings.prod
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py check
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py migrate
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py collectstatic -v0 --noinput --link
|
2024-03-15 22:07:11 +00:00
|
|
|
sudo systemctl reload apache2
|
2024-02-23 04:35:55 +00:00
|
|
|
curl --silent --head https://sfconservancy.org | grep --perl-regexp "^HTTP/.+ 200"
|
|
|
|
EOF
|