Package Data | |
---|---|
Maintainer Username: | olivM |
Maintainer Contact: | olivier.mourlevat@mahi-mahi.fr (Olivier Mourlevat) |
Package Create Date: | 2017-07-04 |
Package Last Update: | 2017-07-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:05:46 |
Package Statistics | |
---|---|
Total Downloads: | 41 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 4 |
Total Forks: | 0 |
Total Open Issues: | 0 |
git-deploy-laravel assists deployment by receiving a push event message from your repository's server and automatically pulling project code.
This should work out-of-the-box with Laravel 5.x using with webhooks from GitHub and GitLab servers.
This is an internal tool to help with our common workflow pattern but please feel free to borrow, change and improve.
Add the following to your composer.json
file then update your composer as normal:
{
"require" : {
"orphans/git-deploy-laravel" : "dev-master"
}
}
Or run:
composer require orphans/git-deploy-laravel
Add the following line to you providers in config/app.php
:
Orphans\GitDeploy\GitDeployServiceProvider::class,
Add the /git-deploy route to CSRF exceptions so your repo's host can send messages to your project.
In file in app/Http/Middleware/VerifyCsrfToken.php
add:
protected $except = [
'git-deploy',
];
Add a webhook for http://your.website.url/git-deploy to your project in GitHub/GitLab and this package will take care of the rest. The webhook should fire on push-events.
Your website will automatically receive POST messages from the repo manager and perform a Git pull.
In most cases the package will find the correct Git repository and Git executable but we advise publishing our config anyway because it will let you enable extra security options and email notifications.
To add custom configuration run:
php artisan vendor:publish --provider="Orphans\GitDeploy\GitDeployServiceProvider"
Then edit /config/gitdeploy.php
, which has been well commented.