Step 3 – Webhook Setup – Github
Next step is to setup the hooks on Github and Bitbucket in order to make them send you the code when you commit the files.
The process is as follows:
- Access your repository;
- go to Settings;
- Add Webhook;
- Set Payload URL as the link to your deploy.php file, i.e.: www.yourdomain.com/deploy/deploy.php
- Set Content Type as: application/json
- Set to Send me everything
- Active the event details;
Next you just need to commit to the repository that Github will send the POST hook to the deploy.php file that will put the files on the server.