-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.php
More file actions
54 lines (42 loc) · 1.28 KB
/
deploy.php
File metadata and controls
54 lines (42 loc) · 1.28 KB
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
<?php
namespace Deployer;
require 'recipe/laravel.php';
set('repository', 'git@gh-{{key}}:azzarip/{{key}}.git');
set('keep_releases', 3);
// Hosts
host('pizza-azzari-deployer')
->set('remote_user', 'deployer')
->set('deploy_path', '/var/www/{{key}}')
->set('ssh_multiplexing', false);
desc('It generates the sitemaps');
task('artisan:sitemap:generate', artisan('sitemap:generate'));
desc('It generates the sitemaps');
task('deploy:build', function () {
run('cd {{release_path}} && npm link vite');
run('cd {{release_path}} && npm link laravel-vite-plugin');
run('cd {{release_path}} && npm run build');
});
desc('Restart queue worker');
task('artisan:queue:restart', function () {
artisan('queue:restart');
});
desc('Optimizes and caches all views, routes, config');
task('artisan:optimize', function () {
artisan('optimize');
artisan('filament:optimize');
});
after('deploy:symlink', 'artisan:queue:restart');
after('deploy:failed', 'deploy:unlock');
task('test:namespace', function () {
writeln('It is pulling the tasks from Utilities');
});
desc('Deploys your project');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:migrate',
'artisan:storage:link',
'artisan:optimize',
'deploy:build',
'deploy:publish',
]);