Love this idea. For small apps, I often just do a git push, ssh to server, git pull, restart app. It sounds like this might make this flow even more simple.
Look into Fabric for scripting your remote SSH commands.
Deployments are a request for a specific ref(branch,sha,tag) to be deployed.
GitHub then dispatches deployment events that external services can listen
for and act on.
http://developer.github.com/v3/repos/deployments/A paragraph or two down the page you linked.
import git
import fs
handle = fs.open('config.php', 'w+')
config = handle.read()
git.start('./')
git.auth('rsa_pub')
git.clone('git@github.com:foo/bar.git')
git.remove_untracked()
handle.write('config.php', config)