mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 21:52:21 +01:00
ci/deploy: Pull code instead of push
This commit is contained in:
@ -29,16 +29,13 @@ deploy:
|
||||
marietje-zuid.science.ru.nl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLticd8NEr6r5QJ2VKFX/rVcfkhM3IcAr+hCgc/kgBSIPEzyRIXd74glIx17FJxvhi2KLC5D+EVtu9CSZhYSe10=
|
||||
EOF
|
||||
|
||||
# Upload to marietje-zuid
|
||||
git push root@marietje-zuid.science.ru.nl:/srv/MarietjeDjango marietje-zuid
|
||||
|
||||
# Deploy the new version
|
||||
cat <<EOF | ssh root@marietje-zuid.science.ru.nl
|
||||
readonly PYTHON="/srv/MarietjeDjango/django_env/bin/python"
|
||||
readonly MANAGE="/srv/MarietjeDjango/marietje/manage.py"
|
||||
|
||||
systemctl stop MarietjeDjango.service
|
||||
git --git-dir=/srv/MarietjeDjango/.git merge marietje-zuid
|
||||
git --git-dir=/srv/MarietjeDjango/.git pull origin marietje-zuid
|
||||
"$PYTHON" "$MANAGE" migrate --noinput
|
||||
"$PYTHON" "$MANAGE" collectstatic --noinput
|
||||
systemctl start MarietjeDjango.service
|
||||
|
||||
Reference in New Issue
Block a user