I got it to work using simple-php-git-deploy . No additional repo is required. Github post-receive intercepts the Github repository, notifying deploy.php on the server to deploy the changes. For editing, you need only a few lines in deploy.php . survitals.com is updated when I click on its Github repository.
- For Dreamhost, the
TARGET_DIR defined in deploy.php should be like /home/user/example.com/ . - It allows you to have files on the server that are not in the repo. For security, I omitted
deploy.php myself from Github because it shows SECRET_ACCESS_TOKEN . - In
deploy.php use URI-safe characters for SECRET_ACCESS_TOKEN b / c, which is used as the request parameter.
source share