-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.php
51 lines (37 loc) · 1.01 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
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Project name
set('application', 'website');
set('repository', 'https://github.com/sukycms/website.git');
set('git_tty', true);
set('ssh_multiplexing', false);
// Shared files/dirs between deploys
add('shared_files', []);
add('shared_dirs', [
'public/uploads',
]);
// Writable dirs by web server
add('writable_dirs', [
'public/uploads',
]);
// Hosts
host('sukycms.com')
->user('suky')
->set('deploy_path', '~/{{application}}');
// Tasks
task('build', function () {
run('cd {{release_path}} && build');
});
after('deploy:failed', 'deploy:unlock');
before('deploy:symlink', 'artisan:migrate');
after('deploy:update_code', 'sukycms:assets:publish');
task('sukycms:assets:publish', function () {
runLocally('yarn run prod');
upload('public/build', '{{release_path}}/public');
upload('public/mix-manifest.json', '{{release_path}}/public');
});
task('artisan:optimize', function () {
});
task('artisan:route:cache', function () {
});