Skip to content

Commit 6f5f392

Browse files
committed
Updating readme
1 parent e5cf787 commit 6f5f392

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,62 @@
1-
# git-deploy-laravel
1+
# Deployments Laravel projects using Git webhooks
22

3-
Helps automate the deployment of Laravel projects onto servers by utilising webhooks.
3+
git-deploy-laravel assists deployment by receiving a push event message from your repository's server and automatically pulling project code.
44

5-
This should work out-of-the-box with webhooks from GitHub and GitLab servers.
6-
7-
**Only tested with Laravel 5.1.1 and GitLab 7.14**
5+
This should work out-of-the-box with Laravel 5.x using with webhooks from GitHub and GitLab servers.
86

97
This is an internal tool to help with our common workflow pattern but please feel free to borrow, change and improve.
108

119
## Installation
1210

13-
Add the following to your `composer.json` file:
11+
12+
### Step 1
13+
14+
Add the following to your `composer.json` file then update your composer as normal:
1415

1516
{
1617
"require" : {
1718
"orphans/git-deploy-laravel" : "dev-master"
1819
}
1920
}
2021

21-
Then install/update your composer project as normal.
22+
Or run:
23+
24+
composer require orphans/git-deploy-laravel
25+
26+
### Step 2
2227

2328
Add the following line to you providers in `config/app.php`:
2429

2530
Orphans\GitDeploy\GitDeployServiceProvider::class,
2631

27-
And the `git-deploy` route to the `$except` variable in your route CRSF middleware file in `app/Http/Middleware/VerifyCsrfToken.php`:
32+
### Step 3
33+
34+
Add the _/git-deploy_ route to CSRF exceptions so your repo's host can send messages to your project.
35+
36+
37+
In file in `app/Http/Middleware/VerifyCsrfToken.php` add:
2838

2939
protected $except = [
3040
'git-deploy',
3141
];
3242

3343
## Usage
3444

35-
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.
45+
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.
3646

37-
It will automatically receive POST messages from the repo manager and perform a Git pull.
47+
Your website will automatically receive POST messages from the repo manager and perform a Git pull.
3848

3949
## Configuration
4050

41-
There is (potentially) important configuration in the package's config file, for things like the email notifications and your repository's root path on the file system.
42-
43-
> Note that this tool tries to automatically determine the repository's root path and that should work suffiently in most cases.
51+
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.
4452

4553
To add custom configuration run:
4654

47-
php artisan vendor:publish
55+
php artisan vendor:publish --provider="Orphans\GitDeploy\GitDeployServiceProvider"
4856

49-
Then edit `/config/gitdeploy.php` which has been well commented.
57+
Then edit `/config/gitdeploy.php`, which has been well commented.
5058

5159
## Future Plans
5260

53-
* Testing on GitHub and different versions of Laravel & GitLab.
5461
* Branch management (i.e. only tigger on changes to active branch).
5562
* Email report on code conflicts that prevent a pull.

0 commit comments

Comments
 (0)