mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
39 lines
736 B
PHP
39 lines
736 B
PHP
<?php
|
|
namespace Deployer;
|
|
|
|
require_once __DIR__ . '/common.php';
|
|
|
|
/**
|
|
* Yii 2 Basic Project Template configuration
|
|
*/
|
|
|
|
// Yii 2 Basic Project Template shared dirs
|
|
set('shared_dirs', ['runtime']);
|
|
|
|
/**
|
|
* Run migrations
|
|
*/
|
|
task('deploy:run_migrations', function () {
|
|
run('{{bin/php}} {{release_path}}/yii migrate up --interactive=0');
|
|
})->desc('Run migrations');
|
|
|
|
/**
|
|
* Main task
|
|
*/
|
|
task('deploy', [
|
|
'deploy:info',
|
|
'deploy:setup',
|
|
'deploy:lock',
|
|
'deploy:release',
|
|
'deploy:update_code',
|
|
'deploy:shared',
|
|
'deploy:vendors',
|
|
'deploy:writable',
|
|
'deploy:run_migrations',
|
|
'deploy:symlink',
|
|
'deploy:unlock',
|
|
'deploy:cleanup',
|
|
])->desc('Deploy your project');
|
|
|
|
after('deploy', 'success');
|