At Hubdoc we created a nice system that allowed us to auto-deploy code committed to Github to our remote servers using Github’s WebHook system. We used runit at Hubdoc because it is an extremely stable way of keeping services running, managing logs, and permissions etc. So they allowed me to open source this module in the hopes that it will be useful to others.
The module is on Github at baudehlo/deploy_to_runit
It has several nice features:
- Runs a pre-run file after updating so you can do “npm install”, run tests, etc
- Supports multi-server deployment scenarios
- Supports running different branches (e.g. for a staging server)
- Emails after deployment, and on any failures
I’m using it now on some servers of mine, and it works great and is very reliable.