From bb1901fed6b20b75e3d22691b035efa179a0f6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 21 Oct 2026 19:18:47 +0200 Subject: [PATCH] fix: build theme assets before composer install Composer publishes an extension's Resources/Public as public/_assets/ only if the directory exists when it runs. The theme's is created by the asset build, so it has to run first; otherwise the release has no _assets link for ep_theme and the theme CSS/JS answer 404. The build now checks the link. Co-Authored-By: Claude Opus 5.5 --- deploy.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)');