I need to run the script on my server, when calling git push
from the local repository to the git gogs repository
#!/bin/sh
git pull origin test
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
sudo systemctl restart gunicorn.service
sudo systemctl restart celery-worker.service
sudo systemctl restart celery-beat.service
Subtracted on the Internet - that you need to use git Hooks. Figured out how to edit hooks.
Question - how can I run a file from a server via SSH from git Hooks ???
ssh user@my.server
This does not work!