-
Notifications
You must be signed in to change notification settings - Fork 18
/
deploy.php
49 lines (41 loc) · 1.26 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
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'contrib/npm.php';
// Config
set('repository', 'https://github.com/SlovakNationalGallery/webumenia.sk.git');
set('bin/php', 'php8.1');
set('bin/npm', 'n --offline exec 20 npm');
add('shared_files', ['public/sitemap.xml']);
add('shared_dirs', [
'public/images/autori',
'public/images/clanky',
'public/images/diela',
'public/images/intro',
'public/images/kolekcie',
'public/images/uploaded',
'public/panorama',
'public/sitemaps',
'resources/fonts',
]);
// Hosts
host('test')
->set('hostname', 'webumenia.sk')
->set('remote_user', 'lab_sng')
->set('deploy_path', '/var/www/test.webumenia.sk');
host('production')
->set('hostname', 'webumenia.sk')
->set('remote_user', 'lab_sng')
->set('deploy_path', '/var/www/webumenia.sk');
// Tasks
task('build', function () {
cd('{{release_path}}');
run('{{bin/npm}} install');
run('{{bin/npm}} run build');
});
// Override default route:cache task for mcamara/laravel-localization
task('artisan:route:cache', artisan('route:trans:cache'));
before('artisan:migrate', 'artisan:cache:clear');
after('deploy:vendors', 'build');
after('deploy:symlink', 'artisan:queue:restart');
after('deploy:failed', 'deploy:unlock');