Push to Deploy
Do you want a PHP post-receive hook connected to GitHub with a GitHub webhook, or, a post-receive bash script hosted on your own server? This repo contains both.
cdinto your project's directory on your server or into your .git folder on your server.
- Get the PHP post-receive file from this Gist. PHP:
wget https://gist.githubusercontent.com/jonathanbell/4f08961709f9172276f9/raw/1b4ae48442c383156a04d5eb1176ab88e7eac3ee/post-receive.phpGit post-recieve hook:
- Make sure the file can be executed ("chmod +x filename").
- If using the PHP version, make sure that you exclude the file (post-receive.php) in your .gitignore file.
- If using the git post-recieve hook, make sure to edit the paths in the file, relating them to your own project.