diff --git a/composer.json b/composer.json index 6956b4e2..0514841f 100644 --- a/composer.json +++ b/composer.json @@ -88,6 +88,7 @@ } }, "require-dev": { + "deployer/deployer": "^7.5", "friendsofphp/php-cs-fixer": "^3.58", "phpunit/phpunit": "^9.5", "symfony/browser-kit": "6.4.*", diff --git a/composer.lock b/composer.lock index d597c987..e6a7f397 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f466394d7b46dccfdd81e934c576acfa", + "content-hash": "69271957d02ff2c31b2de03e799cc85d", "packages": [ { "name": "api-platform/core", @@ -7263,6 +7263,60 @@ ], "time": "2024-05-06T16:37:16+00:00" }, + { + "name": "deployer/deployer", + "version": "v7.5.8", + "source": { + "type": "git", + "url": "https://github.com/deployphp/deployer.git", + "reference": "4900fe799ce5566d54a14103cdfd6e865b7c5d72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/4900fe799ce5566d54a14103cdfd6e865b7c5d72", + "reference": "4900fe799ce5566d54a14103cdfd6e865b7c5d72", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^8.0|^7.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.64", + "pestphp/pest": "^3.3", + "phpstan/phpstan": "^1.4", + "phpunit/php-code-coverage": "^11.0", + "phpunit/phpunit": "^11.4" + }, + "bin": [ + "bin/dep" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" + } + ], + "description": "Deployment Tool", + "homepage": "https://deployer.org", + "support": { + "docs": "https://deployer.org/docs", + "issues": "https://github.com/deployphp/deployer/issues", + "source": "https://github.com/deployphp/deployer" + }, + "funding": [ + { + "url": "https://github.com/sponsors/antonmedv", + "type": "github" + } + ], + "time": "2024-11-27T21:35:20+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -10690,7 +10744,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -10698,6 +10752,6 @@ "ext-ctype": "*", "ext-iconv": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/deploy.php b/deploy.php new file mode 100644 index 00000000..4764b770 --- /dev/null +++ b/deploy.php @@ -0,0 +1,27 @@ +set('remote_user', 'deployer') + ->set('deploy_path', '~/v4') + ->set('dotenv_example', '.env.prod') + ->set('console_options', '--env=prod') + ->set('composer_options', '--verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --no-scripts'); + + +// Hooks + +after('deploy:failed', 'deploy:unlock');