diff --git a/recipe/shopware.php b/recipe/shopware.php index 2404c2e58..9470eb281 100644 --- a/recipe/shopware.php +++ b/recipe/shopware.php @@ -8,6 +8,13 @@ * set('repository', 'git@github.com:shopware/production.git'); * ``` * + * configure host: + * host('SSH-HOSTNAME') + * ->setRemoteUser('SSH-USER') + * ->set('deploy_path', '/var/www/shopware') // This is the path, where deployer will create its directory structure + * ->set('http_user', 'www-data') // Not needed, if the `user` is the same user, the webserver is running with + * ->set('writable_mode', 'chmod'); + * * :::note * Please remember that the installation must be modified so that it can be * [build without database](https://developer.shopware.com/docs/guides/hosting/installation-updates/deployments/build-w-o-db#compiling-the-storefront-without-database). @@ -15,6 +22,7 @@ */ namespace Deployer; + require_once __DIR__ . '/common.php'; add('recipes', ['shopware']); @@ -23,6 +31,8 @@ set('default_timeout', 3600); // Increase when tasks take longer than that. +//set host configuration and repository here + // These files are shared among all releases. set('shared_files', [ '.env', @@ -83,6 +93,10 @@ run('cd {{release_path}} && {{bin/console}} theme:refresh'); }); +task('sw:theme:compile', function () { + run('cd {{release_path}} && {{bin/console}} theme:compile'); +}); + function getPlugins(): array { $output = explode("\n", run('cd {{release_path}} && {{bin/console}} plugin:list')); @@ -132,10 +146,11 @@ function getPlugins(): array /** * Grouped SW deploy tasks. */ + task('sw:deploy', [ 'sw:database:migrate', 'sw:plugin:refresh', - 'sw:theme:refresh', + 'sw:theme:compile', 'sw:cache:clear', 'sw:plugin:update:all', 'sw:cache:clear', @@ -151,7 +166,6 @@ function getPlugins(): array 'deploy:publish', ]); - task('sw-build-without-db:get-remote-config', static function () { if (!test('[ -d {{current_path}} ]')) { return; @@ -166,9 +180,10 @@ function getPlugins(): array }); task('sw-build-without-db:build', static function () { - runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 ./bin/build-js.sh'); + runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 SHOPWARE_SKIP_THEME_COMPILE=1 bin/build-js.sh'); }); + task('sw-build-without-db', [ 'sw-build-without-db:get-remote-config', 'sw-build-without-db:build',