michelmelo / mm-laravel-auto-git-pull
MM Laravel Auto :: Git Pull
Fund package maintenance!
michelmelo
Installs: 2 089
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 3
Open Issues: 0
Requires
- php: >=7.0.0
- phpseclib/phpseclib: >=2.0
README
MM Laravel auto git pull
composer require michelmelo/mm-laravel-auto-git-pull
https://packagist.org/packages/michelmelo/mm-laravel-auto-git-pull
.env Variables
AUTO_PULL_SECRET=xxxxxxxxxxxxxxxxxx
AUTO_PULL_DIR=/var/www/site.com
AUTO_PULL_SERVER_IP=111.11.111.111
AUTO_PULL_SSH_USER=root
AUTO_PULL_SSH_PRIVATE_KEY=storage/app/id_rsa
AUTO_PULL_SSH_USER_PASS=
Add Route in api.php
Route::any('/auto-git-pull', '\MichelMelo\MMAutoGitPull\MMAutoGitPullController@pull');
Create Webhook Url on github.com
http://site.com/api/auto-git-pull?secret=xxxxxxxxxxxxxxxxxx
Result
{ "status": true, "message": "Success!", "data": [ "No local changes to save", "Already up-to-date." ], "errors": [ ] }