komicho/laravel-autodeploy

There is no license information available for the latest version (v0.5) of this package.

v0.5 2020-06-10 15:43 UTC

This package is auto-updated.

Last update: 2024-04-11 00:50:39 UTC


README

Deploy project after pushed commits.

Install via composer

$ composer require laraveleg/laravel-autodeploy

Publish vendor

  • Run php artisan vendor:publish
  • Selection LaravelEG\Laravel\AutoDeploy\ServiceProvider

Config file

Go to config/laraveleg/autodeploy.php

  • You can specify the name of the branch you want to pull from:- 'branch_remote' => 'master'

Add webhook

You can add webhook to route file like routes/api.php

Route::prefix("laraveleg")->group(function () {
    LaravelEG\Laravel\AutoDeploy\WebHook::init();
});

Integrations with git repository

Publishing projects from the repository.

URL (webhook):-

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

Secret Token

Add a value you choose but you must add this value in a .env file

LARAVELEG_AUTODEPLOY_TOKEN=<SECRET_TOKEN>

Git bar

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