GitHubHook
GitHub Post-Receive Deployment Hook
Install / Use
/learn @kwangchin/GitHubHookREADME
GitHub Post-Receive Deployment Hook
Deploying applications to development, staging and production never been so easy with GitHub Post-Receive Deployment Hook script!
Installation
Clone the script:
<pre><code>$ <strong>git clone https://github.com/kwangchin/GitHubHook.git</strong> </code></pre>Go to your GitHub repo > Admin > Service Hooks, select Post-Receive URLS and enter your hook URL like this:

How It Works
GitHub provides Post-Receive Hooks to allow HTTP callback with a HTTP Post. We then create a script for the callback to deploy the systems automatically.
You will need to create branches like stage and prod in Git before proceeding into the configurations.
You then can have a brief look into hook.php, a WebHook example provided for you to experience how simple the configurations are.
In this example, we enabled the debug log for messages with timestamp. You can disable this by commenting or removing the line $hook->enableDebug()
We have a staging site and a production site in this example. You can add more branches easily with $hook->addBranch() method if you have more systems to deploy.
We then use $hook->deploy() to deploy the systems.
Security
Worry about securities? We have enabled IP check to allow only GitHub hook addresses (CIDR notation): 192.30.252.0/22 to deploy the systems. We also return a 404 Not Found page when there is illegal access to the hook script.
For better security, try hiding this hook script in deep directories like http://www.example.com/let/us/play/hide/and/seek/ and/or renaming the hook.php file into a40b6cf7a5.php.
For Developers
We are trying to make developers life easier. Kindly fork this on GitHub and submit your pull requests to help us.
Related Skills
tmux
346.8kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
diffs
346.8kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
terraform-provider-genesyscloud
Terraform Provider Genesyscloud
blogwatcher
346.8kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
