Deploy project after pushed commits.
$ composer require laraveleg/laravel-autodeploy
- Run
php artisan vendor:publish
- Selection
LaravelEG\Laravel\AutoDeploy\ServiceProvider
Go to config/laraveleg/autodeploy.php
- You can specify the name of the branch you want to pull from:-
'branch_remote' => 'master'
You can add webhook to route file like routes/api.php
Route::prefix("laraveleg")->group(function () {
LaravelEG\Laravel\AutoDeploy\WebHook::init();
});
Publishing projects from the repository.
You can use url <BASE_URL>/api/laraveleg/deploy/<LARAVELEG_AUTODEPLOY_TOKEN>
Do not use web routes
LARAVELEG_AUTODEPLOY_TOKEN
It is the secret token in LARAVELEG_AUTODEPLOY_TOKEN value inside .env
file
Add a value you choose but you must add this value in a .env file
LARAVELEG_AUTODEPLOY_TOKEN=<SECRET_TOKEN>
Can enbale show git bar you wint add new middleware in app/Http/Kernel.php file
\LaravelEG\Laravel\AutoDeploy\App\Http\Middleware\LastCommitMiddleware::class
This feature does not work in production mode