Basic steps:
- set up Travis deploy key for your deploy user
- update .travis.yml with deploy stage to add this key to ssh-agent
- create a bare repo on your deployment server to use as a remote
- set up post-receive hook, using git sparse checkout to checkout subdirectories to different working trees
#!/bin/sh
git config --global core.sparsecheckout true
echo backend > /home/travis/playlist-deploy/.git/info/sparse-checkout
git --work-tree=/opt/playlist/ --git-dir=/home/travis/playlist-deploy/.git checkout -f