2018-11-14 07:44:04 +01:00
|
|
|
<?php
|
|
|
|
namespace Deployer;
|
|
|
|
|
2020-10-25 16:00:05 +01:00
|
|
|
require_once __DIR__ . '/symfony.php';
|
|
|
|
|
|
|
|
add('recipes', ['sulu']);
|
2018-11-14 07:44:04 +01:00
|
|
|
|
2020-10-25 16:00:05 +01:00
|
|
|
add('shared_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'public/uploads']);
|
2018-11-14 07:44:04 +01:00
|
|
|
|
2020-10-25 16:00:05 +01:00
|
|
|
add('writable_dirs', ['public/uploads']);
|
2018-11-14 07:44:04 +01:00
|
|
|
|
|
|
|
set('bin/websiteconsole', function () {
|
2021-04-03 13:05:45 +01:00
|
|
|
return parse('{{bin/php}} {{release_or_current_path}}/bin/websiteconsole --no-interaction');
|
2018-11-14 07:44:04 +01:00
|
|
|
});
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
desc('Migrates PHPCR');
|
2020-10-29 23:16:36 +01:00
|
|
|
task('phpcr:migrate', function () {
|
|
|
|
run('{{bin/console}} phpcr:migrations:migrate');
|
|
|
|
});
|
2018-11-14 07:44:04 +01:00
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
desc('Clears cache');
|
2018-11-14 07:44:04 +01:00
|
|
|
task('deploy:website:cache:clear', function () {
|
2020-10-25 16:00:05 +01:00
|
|
|
run('{{bin/websiteconsole}} cache:clear --no-warmup');
|
2018-11-14 07:44:04 +01:00
|
|
|
});
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
desc('Warmups cache');
|
2018-11-14 07:44:04 +01:00
|
|
|
task('deploy:website:cache:warmup', function () {
|
2020-10-25 16:00:05 +01:00
|
|
|
run('{{bin/websiteconsole}} cache:warmup');
|
2018-11-14 07:44:04 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
after('deploy:cache:clear', 'deploy:website:cache:clear');
|
|
|
|
after('deploy:website:cache:clear', 'deploy:website:cache:warmup');
|