diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e43b0f9..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store diff --git a/README.md b/README.md index 569659d..61b7c0c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Deployment of Laravel projects using Git webhooks -git-deploy-laravel allow for automated deployment using webhook requests from your repository's server, and automatically pulling project code using the local Git binary. +git-deploy-laravel allows for automated deployment using webhook requests from your repository's server, and automatically pulls project code using the local Git binary. This should work out-of-the-box with Laravel 5.x using with webhooks from GitHub and GitLab servers. @@ -25,14 +25,6 @@ Or run: ### Step 2 -Add the following line to you providers in `config/app.php`: - - Orphans\GitDeploy\GitDeployServiceProvider::class, - -** New in Laravel 5.5 - Service provide should be automatically detected without the above change ** - -### Step 3 - Add the _/git-deploy_ route to CSRF exceptions so your repo's host can send messages to your project. @@ -42,7 +34,7 @@ In file in `app/Http/Middleware/VerifyCsrfToken.php` add: 'git-deploy', ]; -### Step 4 Optional +### Step 3 Optional In case you need additional action after a successful commit, you can add you own Event Listener. For example you can write your own update script to run migrations etc. diff --git a/composer.json b/composer.json index efadb08..fa8103e 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,20 @@ { - "name": "orphans/git-deploy-laravel", - "description": "Helps automate the deployment of projects onto servers by utilising Git web hooks.", - "license": "MIT", - "autoload": { - "psr-4": { - "Orphans\\GitDeploy\\": "src" - } - }, - "require": { - "illuminate/http": "~5", - "illuminate/config": "~5", - "illuminate/support": "~5" - }, - "extra": { - "laravel": { - "providers": [ - "Orphans\\GitDeploy\\GitDeployServiceProvider" - ] - } + "name": "orphans/git-deploy-laravel", + "description": "Helps automate the deployment of projects onto servers by utilising Git web hooks.", + "license": "MIT", + "autoload": { + "psr-4": { + "Orphans\\GitDeploy\\": "src" } + }, + "require": { + "illuminate/support": "^5.5|^6.0|^7.0|^8.0" + }, + "extra": { + "laravel": { + "providers": [ + "Orphans\\GitDeploy\\GitDeployServiceProvider" + ] + } + } } diff --git a/src/http/routes.php b/routes/web.php similarity index 69% rename from src/http/routes.php rename to routes/web.php index 230ab16..0fd6e83 100644 --- a/src/http/routes.php +++ b/routes/web.php @@ -1,3 +1,5 @@ commits = $commits; } -} \ No newline at end of file +} diff --git a/src/GitDeployServiceProvider.php b/src/GitDeployServiceProvider.php index 975b073..74006c4 100644 --- a/src/GitDeployServiceProvider.php +++ b/src/GitDeployServiceProvider.php @@ -16,7 +16,7 @@ public function boot() $this->publishes([ __dir__ . '/../config/gitdeploy.php' => config_path('gitdeploy.php') ], 'config'); - $this->loadRoutesFrom(__dir__ . '/http/routes.php'); + $this->loadRoutesFrom(__dir__ . '/../routes/web.php'); $this->loadViewsFrom(__dir__ . '/views', 'gitdeploy'); } diff --git a/src/http/GitDeployController.php b/src/Http/GitDeployController.php similarity index 100% rename from src/http/GitDeployController.php rename to src/Http/GitDeployController.php