-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
46 lines (33 loc) · 1023 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
<?php
namespace Deployer;
require 'recipe/common.php';
// Start editable
set('repository', '[email protected]:transitionnetwork/CDS.git');
set('ssh_type', 'native');
set('ssh_multiplexing', true);
// End editable
// Do not modify anything under this line unless you know what you're doing
inventory('servers.yml');
task('deploy:gulp', function() {
$do_gulp = askConfirmation('Run Gulp?', false);
if( $do_gulp ) { runLocally('gulp --production'); }
})->desc('Create dist folder');
task('deploy:upload_dist', function() {
upload('dist', '{{release_path}}');
})->desc('Upload dist folder to server');
task('deploy:theme_composer', function() {
cd('{{release_path}}');
run('~/composer.phar install');
})->desc('Remote composer install');
task('setup', [
'deploy:prepare',
])->desc('Inital deployment setup');
task('deploy', [
'deploy:gulp',
'deploy:release',
'deploy:update_code',
'deploy:upload_dist',
'deploy:theme_composer',
'deploy:symlink',
'cleanup'
])->desc('Executing Deploy task');