fix(cms): deploy exec was missing cwd — landed on / and never ran
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions

Root cause of publishes not rebuilding the site: the deploy exec child
started in the process working directory (repo root), so 'cd ../../../'
resolved to the filesystem root, where creating deploy.log failed with
Permission denied. The git publish command already used cwd: CONTENT_DIR;
the deploy child now does too (caught via live cwd/touch diagnostics in
the service context).

Closes MITHOME-74
This commit is contained in:
Do Siki
2026-08-19 17:14:02 +02:00
parent d0270547cc
commit 42533ec0aa
+5 -1
View File
@@ -314,7 +314,11 @@ const server = http.createServer(async (req, res) => {
const deployCmd = process.env.CONTENT_EDITOR_DEPLOY_CMD
|| `cd ../../../ && ./deploy.sh ${CMS_DEPLOY_ENV} > deploy.log 2>&1`;
writeAudit('deploy_spawned', { clientAddress, user: CMS_USER, env: CMS_DEPLOY_ENV });
exec(deployCmd, { maxBuffer: 8 * 1024 * 1024 }, deployError => {
// WHY cwd: without it the child starts in the process working directory
// (repo root), where `cd ../../../` lands on "/" — no write access, so
// deploy.log creation failed with Permission denied and the deploy never
// ran. CONTENT_DIR is the same base the git publish command uses.
exec(deployCmd, { cwd: CONTENT_DIR, maxBuffer: 8 * 1024 * 1024 }, deployError => {
writeAudit('deploy_exec_exit', {
clientAddress,
user: CMS_USER,