-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.php
61 lines (52 loc) · 1.23 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Deploy script using deployer.org.
*/
namespace Deployer;
require 'recipe/common.php';
require 'recipe/npm.php';
require 'app/recipe/bower.php';
require 'app/recipe/grunt.php';
host('107.22.150.147')
->stage('production')
->user('agenda30')
->set('deploy_path', '/home/agenda30')
->set('http_user', 'www-data');
set('repository', '[email protected]:aztecweb/agenda30.org.git');
set('branch', 'master');
set('ssh_multiplexing', false);
set('shared_files', [
'.env'
]);
set('shared_dirs', [
'web/wp-content/uploads'
]);
set('writable_dirs', [
'web/wp-content/uploads'
]);
task('deploy:install', function () {
run('cd {{release_path}} && bin/install');
});
task('deploy:notes', function () {
writeln('Reload the PHP-FPM manually in the server');
});
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared', // execute before installation to share .env file
'npm:install',
'deploy:vendors',
'bower:install',
'grunt:build',
'deploy:install',
'deploy:shared', // execute after installation beacause deploy:vendor overwrite the public directory
'deploy:writable',
'deploy:clear_paths',
'deploy:symlink',
'deploy:unlock',
'deploy:notes',
'cleanup',
'success'
]);