You can use GitHub Webhooks to create a PHP algorithm that detects changes in a GitHub repository and automatically pulls the repository.
Download, edit and upload files to server ready.
Edit:
$userAccess = "githubname";
$repoCheck = ["githubname", true]; // check url
Clone the repo
git clone https://github.com/EW-EndWall/github-hook.git