Github Autodeploy
Automatically deploy your web app repositories on "git push".
Project Details
GitHub AutoDeploy
Author: Afaan Bilal
Project Page: afaan.dev/github-autodeploy
Introduction
GitHub AutoDeploy is a PHP script to easily deploy web app repositories on git push or
any other hook. I wrote this when a relentless search for something which could do this proved
fruitless. I needed to automatically deploy a web app to a shared server on which I had no SSH
access, as is required to achieve this. The other way was to setup a git repo on the server and
execute a git pull on each git push for the git server, but since it was a shared server,
there was no exec or shell_exec for me either.
So, I had to write it myself.
Features
- No SSH access required.
- No shell access required.
- Fully compatible with shared servers.
- Currently, only public repos are supported.
Setup
- Download github-autodeploy.php.
- Update the GitHub repo link by replacing
[USERNAME]and[REPO]. - Set the deploy directory by replacing
[DEPLOY_DIR]relative to the script. - Set your timezone.
- Upload the script to your server.
- On GitHub, add a WebHook to your repo for a
pushevent (or any other) and
set it to the uploaded script. - You're done!
Now, whenever you git push to your github repo, it will be automatically deployed
to your web server!
Adding a WebHook
You must have administrative access to the repo for adding WebHooks
- Go to your GitHub repo »
Settings»Webhooks & services. - Click
Add webhook. - Enter the URL of the github-autodeploy.php script in the
Payload URLfield. - Leave everything else as is, click
Add webhook. - You're done!
Contributing
All contributions are welcome. Please create an issue first for any feature request
or bug. Then fork the repository, create a branch and make any changes to fix the bug
or add the feature and create a pull request. That's it!
Thanks!
License
GitHub AutoDeploy is released under the MIT License.
Check out the full license here.
License
The MIT License (MIT)
Copyright (c) 2012-2016 Afaan Bilal, AMX Infinity!
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.