deployer/recipe/yii2-app-basic.php

45 lines
913 B
PHP
Raw Normal View History

2015-09-01 15:25:40 +06:00
<?php
/* (c) Alexey Rogachev <arogachev90@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2016-01-11 14:00:45 +07:00
namespace Deployer;
2015-09-01 15:25:40 +06:00
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 () {
2016-04-04 16:51:42 +07:00
run('{{bin/php}} {{release_path}}/yii migrate up --interactive=0');
2015-09-01 15:25:40 +06:00
})->desc('Run migrations');
/**
* Main task
*/
task('deploy', [
2017-08-12 12:01:27 +03:00
'deploy:info',
2015-09-01 15:25:40 +06:00
'deploy:prepare',
2016-11-05 12:56:53 +07:00
'deploy:lock',
2015-09-01 15:25:40 +06:00
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:writable',
2015-09-01 15:25:40 +06:00
'deploy:run_migrations',
'deploy:symlink',
2016-11-05 12:56:53 +07:00
'deploy:unlock',
2015-09-01 15:25:40 +06:00
'cleanup',
])->desc('Deploy your project');
after('deploy', 'success');