...
 
Commits (2)
<?php
namespace Deployer;
use Deployer\Task\Context;
require __DIR__ . '/vendor/deployer/deployer/recipe/common.php';
// Project name
set('application', 'my_project');
// Project repository
set('repository', 'https://gitlab.grifart.cz/grifart/deployer-workshop-brno.git');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// Shared files/dirs between deploys
set('shared_files', []);
set('shared_dirs', []);
// Writable dirs by web server
set('writable_dirs', []);
// Hosts
localhost('project.com')
->set('deploy_path', __DIR__ . '/../target/site');
// Tasks
task('deploy:copy-application', function() {
upload(__DIR__ . '/', '{{release_path}}');
});
desc('Deploy your project');
task('deploy', [
'deploy:info',
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:copy-application',
'deploy:shared',
'deploy:writable',
'deploy:clear_paths',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
]);
// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');