diff --git a/deploy/install.yml b/bin/deploy/install.yml similarity index 100% rename from deploy/install.yml rename to bin/deploy/install.yml diff --git a/deploy/inventory.ini b/bin/deploy/inventory.ini similarity index 100% rename from deploy/inventory.ini rename to bin/deploy/inventory.ini diff --git a/deploy/postfix/main.cf b/bin/deploy/postfix/main.cf similarity index 100% rename from deploy/postfix/main.cf rename to bin/deploy/postfix/main.cf diff --git a/deploy/systemd/README.md b/bin/deploy/systemd/README.md similarity index 100% rename from deploy/systemd/README.md rename to bin/deploy/systemd/README.md diff --git a/deploy/systemd/conservancy-www-cleanup.service b/bin/deploy/systemd/conservancy-www-cleanup.service similarity index 100% rename from deploy/systemd/conservancy-www-cleanup.service rename to bin/deploy/systemd/conservancy-www-cleanup.service diff --git a/deploy/systemd/conservancy-www-db.path b/bin/deploy/systemd/conservancy-www-db.path similarity index 100% rename from deploy/systemd/conservancy-www-db.path rename to bin/deploy/systemd/conservancy-www-db.path diff --git a/deploy/systemd/conservancy-www-db.service b/bin/deploy/systemd/conservancy-www-db.service similarity index 100% rename from deploy/systemd/conservancy-www-db.service rename to bin/deploy/systemd/conservancy-www-db.service diff --git a/deploy/systemd/conservancy-www-linkchecker.service b/bin/deploy/systemd/conservancy-www-linkchecker.service similarity index 100% rename from deploy/systemd/conservancy-www-linkchecker.service rename to bin/deploy/systemd/conservancy-www-linkchecker.service diff --git a/deploy/systemd/conservancy-www-linkchecker.timer b/bin/deploy/systemd/conservancy-www-linkchecker.timer similarity index 100% rename from deploy/systemd/conservancy-www-linkchecker.timer rename to bin/deploy/systemd/conservancy-www-linkchecker.timer diff --git a/deploy/systemd/conservancy-www-update.service b/bin/deploy/systemd/conservancy-www-update.service similarity index 100% rename from deploy/systemd/conservancy-www-update.service rename to bin/deploy/systemd/conservancy-www-update.service diff --git a/deploy/systemd/conservancy-www-update.sh b/bin/deploy/systemd/conservancy-www-update.sh similarity index 100% rename from deploy/systemd/conservancy-www-update.sh rename to bin/deploy/systemd/conservancy-www-update.sh diff --git a/deploy/systemd/conservancy-www-update.timer b/bin/deploy/systemd/conservancy-www-update.timer similarity index 100% rename from deploy/systemd/conservancy-www-update.timer rename to bin/deploy/systemd/conservancy-www-update.timer diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 00000000..6a1fc312 --- /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