-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.php
More file actions
45 lines (34 loc) · 906 Bytes
/
deploy.php
File metadata and controls
45 lines (34 loc) · 906 Bytes
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/laravel.php';
// Config
set('repository', 'https://github.com/msamgan/msamgan.com.git');
add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', []);
// Hosts
host('146.190.32.125')
->set('remote_user', 'msamgan')
->set('deploy_path', '~/htdocs/msamgan.com');
desc('Build the assets');
task('build', function () {
cd('{{release_path}}');
run('npm install');
run('npm run build');
});
task('optimize', function () {
cd('{{release_path}}');
run('php artisan optimize');
});
task('generate_sitemap', function () {
cd('{{current_path}}');
run('php artisan app:generate-sitemap');
});
task('clear_cache', function () {
cd('{{current_path}}');
run('php artisan cache:clear');
});
after('deploy:vendors', 'build');
after('deploy:symlink', 'optimize');
// Hooks
after('deploy:failed', 'deploy:unlock');