I want to host a website with Dreamhost whose files are editable via Github such that when commits are pushed to Github the actual website updates. How can I best achieve this? Dreamhost offers Subversion as a one-click install. For git it gives cautionary advice. I prefer git over Subversion. Syncing git to Subversion seems viable. Where in the directory structure would Subversion need to be installed in order to have the site display the content (not the repo)? Recommendations?
I got it to work using simple-php-git-deploy. No extra repo needed. Github post-receive hooks on the Github repo notify the deploy.php file on the server to deploy the changes. There's just a few lines in deploy.php
to edit. survitals.com updates when I push to its Github repo.
TARGET_DIR
defined in deploy.php
needed to be like /home/user/example.com/
.deploy.php
itself from Github because it shows the SECRET_ACCESS_TOKEN
.deploy.php
use URI-safe characters for the SECRET_ACCESS_TOKEN
b/c it gets used as a query parameter.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With