deployer/recipe/sulu.php

33 lines
872 B
PHP
Raw Normal View History

<?php
namespace Deployer;
2020-10-25 16:00:05 +01:00
require_once __DIR__ . '/symfony.php';
add('recipes', ['sulu']);
2020-10-25 16:00:05 +01:00
add('shared_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'public/uploads']);
2020-10-25 16:00:05 +01:00
add('writable_dirs', ['public/uploads']);
set('bin/websiteconsole', function () {
return parse('{{bin/php}} {{release_or_current_path}}/bin/websiteconsole --no-interaction');
});
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');
});
2021-11-08 22:59:39 +01:00
desc('Clears cache');
task('deploy:website:cache:clear', function () {
2020-10-25 16:00:05 +01:00
run('{{bin/websiteconsole}} cache:clear --no-warmup');
});
2021-11-08 22:59:39 +01:00
desc('Warmups cache');
task('deploy:website:cache:warmup', function () {
2020-10-25 16:00:05 +01:00
run('{{bin/websiteconsole}} cache:warmup');
});
after('deploy:cache:clear', 'deploy:website:cache:clear');
after('deploy:website:cache:clear', 'deploy:website:cache:warmup');