@thewismit If you keep everything in git and your you're publishing it to the server by eg pushing over ssh you can use commit hooks [1].
They should work on termux on your Android too but I haven't used Android for quite a while so I don't know what shape it's in.
[1] https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks