deployer/recipe/cakephp.php

57 lines
1.1 KiB
PHP
Raw Normal View History

2015-09-25 16:05:47 -04:00
<?php
2016-01-11 14:00:45 +07:00
namespace Deployer;
2015-09-25 16:05:47 -04:00
require_once __DIR__ . '/common.php';
/**
* CakePHP 3 Project Template configuration
*/
2015-09-25 22:33:30 -04:00
// CakePHP 3 Project Template shared dirs
2015-09-25 16:05:47 -04:00
set('shared_dirs', [
'logs',
'tmp',
]);
2015-09-25 22:33:30 -04:00
// CakePHP 3 Project Template shared files
2015-09-25 16:05:47 -04:00
set('shared_files', [
'config/app.php',
]);
/**
* Create plugins' symlinks
2015-09-25 16:05:47 -04:00
*/
task('deploy:init', function () {
run('{{release_path}}/bin/cake plugin assets symlink');
2015-09-25 16:05:47 -04:00
})->desc('Initialization');
/**
* Run migrations
*/
task('deploy:run_migrations', function () {
run('{{release_path}}/bin/cake migrations migrate');
run('{{release_path}}/bin/cake orm_cache clear');
run('{{release_path}}/bin/cake orm_cache build');
2015-09-25 16:05:47 -04:00
})->desc('Run migrations');
/**
* Main task
*/
task('deploy', [
2017-08-12 12:01:27 +03:00
'deploy:info',
2020-04-25 23:00:08 +03:00
'deploy:setup',
2016-11-05 12:56:53 +07:00
'deploy:lock',
2015-09-25 16:05:47 -04:00
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:writable',
2015-09-25 16:05:47 -04:00
'deploy:init',
'deploy:run_migrations',
'deploy:symlink',
2016-11-05 12:56:53 +07:00
'deploy:unlock',
2020-04-25 23:00:08 +03:00
'deploy:cleanup',
2015-09-25 16:05:47 -04:00
])->desc('Deploy your project');
after('deploy', 'success');