Review
Create a deploy user, give him SSH keys
Add the keys to the repository as deploy keys
Create a script to git pull your project
Allow www-data to sudo the script as deploy
Create a deploy application to run the script
Add the hook to the repository
Code, commit and push