I have 2 servers whenever i'm developing. Stagin and production. I use Buddy.
Whenever I push commit(s):
- Commits are pushed to buddy's git server (I use a development branch).
- Once buddy receives the commit(s), it is then pushed to my private gitlab server.
- From there, the files are automatically copied to staging where I can do tests etc.
- After a lot of testing, I merge development with master and tag the release obeying semver
- If all is well and good, I manually push changes to production.
- Once, I do that, Capistrano handles versioning on server so that I can easily rollback changes yada yada.
This is basically what I use. Scaling, that's another beast.