So I have a python project on my VPS that I want to always be running, and when I push an update through git, it updates its files and restarts. How would I do this? (A discord.py rewrite bot exactly)
You could add a GitHub webhook to a Discord channel and make your bot listen to it. If it detects a push message, make it run git pull and quit. Then, just run the bot in a loop with while true; do python bot.py; done.
Alternatively, write another script that will listen for HTTP requests from a GitHub webhook and kill the bot. You'll probably need to save the PID using bash.
How to have a VPS auto update on git pushes