-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
deploy.php
46 lines (38 loc) · 931 Bytes
/
deploy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types=1);
namespace Deployer;
require 'contrib/rsync.php';
require 'recipe/common.php';
set('rsync', [
'exclude' => [
'.git',
'deploy.php',
],
'exclude-file' => false,
'include' => [],
'include-file' => false,
'filter' => [],
'filter-file' => false,
'filter-perdir' => false,
'flags' => 'rz',
'options' => ['delete'],
'timeout' => 60,
]);
set('rsync_src', __DIR__ . '/dir');
set('rsync_dest', '{{release_path}}');
host('production')
->setHostname(getenv('DEPLOY_IP'))
->setRemoteUser(getenv('DEPLOY_USERNAME'))
->setDeployPath(getenv('DEPLOY_PATH'));
task('deploy', [
'deploy:info',
'deploy:setup',
'deploy:lock',
'deploy:release',
'rsync',
'deploy:symlink',
'deploy:unlock',
'deploy:cleanup',
'deploy:success',
]);
after('deploy:failed', 'deploy:unlock');