ziorye/ddeployer

Deploy Laravel applications via Github or Gitlab webhooks

3.0.0 2022-04-19 04:27 UTC

This package is auto-updated.

Last update: 2024-05-19 09:10:09 UTC


README

Deploy Laravel applications via Github or Gitlab webhooks

Installing

For Laravel 9.x
composer require ziorye/ddeployer:^3.0

For Laravel 8.x
composer require ziorye/ddeployer:^2.0

For Laravel 7.x || 6.x || 5.8.x
composer require ziorye/ddeployer:^1.0

Usage

  1. Run the command below to publish the package config file config/ddeployer.php:
php artisan vendor:publish --provider="Ziorye\DDeployer\DDeployerServiceProvider"
  1. Open your .env and add the SECRET_TOKEN to it:
SECRET_TOKEN=[you can use `Str::random()` to generate a random alpha-numeric string]
  1. Add new GitHub webhook manually by using the following values:
  • Payload URL: config('app.url') . '/ddeployer/deploy'
  • Content Type: application/json
  • Secret: the SECRET_TOKEN value your just set to .env
  • Which events? Just the push event is enough.

Upgrading

  1. Run the command below to upgrade the package
composer update ziorye/ddeployer
  1. Overwrite the existing package config file config/ddeployer.php:
php artisan vendor:publish --provider="Ziorye\DDeployer\DDeployerServiceProvider" --force

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT