Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thedragoncode/laravel-deploy-operations
Run operations after deployment - just like you do it with migrations!
https://github.com/thedragoncode/laravel-deploy-operations
action actions cicd deploy deployment deployments dispatch jobs laravel laravel-framework migration migration-tool migrations operations
Last synced: 27 days ago
JSON representation
Run operations after deployment - just like you do it with migrations!
- Host: GitHub
- URL: https://github.com/thedragoncode/laravel-deploy-operations
- Owner: TheDragonCode
- License: mit
- Created: 2020-12-02T11:47:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T18:29:51.000Z (6 months ago)
- Last Synced: 2024-05-21T18:33:01.074Z (6 months ago)
- Topics: action, actions, cicd, deploy, deployment, deployments, dispatch, jobs, laravel, laravel-framework, migration, migration-tool, migrations, operations
- Language: PHP
- Homepage: https://deploy-operations.dragon-code.pro
- Size: 3.98 MB
- Stars: 190
- Watchers: 2
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚀 Laravel Deploy Operations
![the dragon code laravel deploy operations](https://preview.dragon-code.pro/the-dragon-code/deploy-operations.svg?brand=laravel&mode=dark)
[![Stable Version][badge_stable]][link_packagist]
[![Total Downloads][badge_downloads]][link_packagist]
[![Github Workflow Status][badge_build]][link_build]
[![License][badge_license]][link_license]âš¡ **Performing any actions during the deployment process**
Create specific classes for a one-time or more-time usage, that can be executed automatically after each deployment.
Perfect for seeding or updating some data instantly after some database changes, feature updates, or perform any
actions.This package is for you if...
- you regularly need to update specific data after you deploy new code
- you often perform jobs after deployment
- you sometimes forget to execute that one specific job and stuff gets crazy
- your code gets cluttered with jobs that are not being used anymore
- your co-workers always need to be reminded to execute that one job after some database changes
- you often seed or process data in a migration file (which is a big no-no!)## Installation
```Bash
composer require dragon-code/laravel-deploy-operations
```Guidelines for upgrading from previous versions and `dragon-code/laravel-migration-actions` and
`dragon-code/laravel-actions` packages can be found in [this section](https://deploy-operations.dragon-code.pro/upgrade-guide/) of the documentation.## Documentation
📚 Read the full documentation at [deploy-operations.dragon-code.pro][link_website].
## Basic Usage
Create your first operation using `php artisan make:operation` console command and define the actions it should
perform.```php
use App\Models\Article;
use DragonCode\LaravelDeployOperations\Operation;return new class extends Operation {
public function __invoke(): void
{
Article::query()
->lazyById(chunkSize: 100, column: 'id')
->each->update(['is_active' => true]);// and/or any actions...
}
};
```Next, you can run the console command to start operations:
```Bash
php artisan operations
```📚 [Check out the full documentation to learn everything that Laravel Deploy Operations has to offer.][link_website]
## Downloads Stats
This project has gone the way of several names, and here are the number of downloads of each of them:
- ![](https://img.shields.io/packagist/dt/dragon-code/laravel-deploy-operations?style=flat-square&label=dragon-code%2Flaravel-deploy-operations)
- ![](https://img.shields.io/packagist/dt/dragon-code/laravel-actions?style=flat-square&label=dragon-code%2Flaravel-actions)
- ![](https://img.shields.io/packagist/dt/dragon-code/laravel-migration-actions?style=flat-square&label=dragon-code%2Flaravel-migration-actions)
- ![](https://img.shields.io/packagist/dt/andrey-helldar/laravel-actions?style=flat-square&label=andrey-helldar%2Flaravel-actions)An [upgrade](https://deploy-operations.dragon-code.pro/upgrade-guide/) section is available in the documentation for upgrading to a new version.
## License
This package is licensed under the [MIT License](LICENSE).
[badge_build]: https://img.shields.io/github/actions/workflow/status/TheDragonCode/laravel-actions/phpunit.yml?style=flat-square
[badge_downloads]: https://img.shields.io/packagist/dt/dragon-code/laravel-actions.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/dragon-code/laravel-deploy-operations.svg?style=flat-square
[badge_stable]: https://img.shields.io/github/v/release/TheDragonCode/laravel-actions?label=packagist&style=flat-square
[link_build]: https://github.com/TheDragonCode/laravel-actions/actions
[link_license]: LICENSE
[link_packagist]: https://packagist.org/packages/dragon-code/laravel-deploy-operations
[link_website]: https://deploy-operations.dragon-code.pro