We are trying to use GitHub as our version control for a WordPress/BuddyPress based site. We want to automate our 'pulls' every 5 minutes, where we keep our live server in sync with our private GitHub repo. I know I need to use cron, but I'm not sure where exactly to go from here. The server is Ubuntu based, if it matters.
Do I just need to create a cron-job where the server pulls from our GitHub repo every 5 minutes, or do we need to have a staging folder? This is where I get confused. If someone could point (or explain themselves) how to create a cron job in this scenario.
This is a cron job description that will pull changes from the origin repo every five minutes:
*/5 * * * * cd /path/to/wordpress/repo && git pull origin master