diff --git a/deploy.php b/deploy.php index c6ea574..0b30dd4 100644 --- a/deploy.php +++ b/deploy.php @@ -92,8 +92,11 @@ task('build', function () { : 'ddev exec bash -c ' . escapeshellarg($command)); runLocally('rm -rf {{build_dir}} && mkdir -p {{build_dir}}'); runLocally('git archive HEAD | tar -x -C {{build_dir}}'); - $exec('cd var/deploy-build && composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader'); + // Assets first: Composer only publishes an extension's Resources/Public as public/_assets/ + // if the directory exists when it runs, and the theme's is created by the build $exec('cd var/deploy-build && npm ci --no-audit --no-fund && npm run build'); + $exec('cd var/deploy-build && composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader'); + runLocally('test -L {{build_dir}}/public/_assets/' . md5('/vendor/ep/ep-theme/') . ' && test -f {{build_dir}}/packages/ep_theme/Resources/Public/entrypoints.json'); })->once(); desc('Read-only checks of the host before the first deploy (see .ddev/plans/TYPO3-13-GO-LIVE.md)');