So, what I ended up doing is the following: I have a folder on my local computer which is tracked through git and I sync this with a remote server.
On the server on which I need the software I do not have the git repository.
In the git repository I have all the documents I'm developing, a lib folder, a build folder, a deploy folder and a virtual environment.
I have a post-commit hook which builds all the software and in the deploy folder I have symlinks to all the executables I want to have on the server.
The hook also pushed everything in the deploy folder and everything in the lib folder to a stow directory on the server through rsync.
At this point I can update any existing software by simply changing the code and committing.
To add new programs I have to perform an extra step, which is to restow the folder on the server.
This works out quite nicely for me, since virtual environment and all build dependencies stay out of the way and I easily get everything on the server.
I might as well start writing some tests for my software, but that will come a bit later...
@rastinza seems like a classic CI/CD example.
One could have used a hook on the push to main which would automatically build and then send to server. This is what still missing for my setup.
I do something similar, where I wrote my own bash script that would build the code and then rsync to server via ssh.