fix(web): webhook reloads via ecosystem file so committed env (VEHICLE_*) applies on deploy

This commit is contained in:
FURRO404
2026-06-18 01:36:52 -07:00
parent 6ff8d8e682
commit 1dcabf6a78
+11 -3
View File
@@ -560,9 +560,17 @@ async function deploy(push) {
promoteBuiltDist() promoteBuiltDist()
syncVehicleIcons() syncVehicleIcons()
for (const target of RESTART_TARGETS) { // Reload via the ecosystem file (not by bare name) with --only so each deploy
await run('pm2', ['reload', target, '--update-env']) // re-reads the committed env blocks (e.g. VEHICLE_* paths). `pm2 reload <name>
} // --update-env` would only merge the CLI's process.env and ignore the file.
// --only excludes tssbot-webhook so the webhook never reloads itself mid-deploy.
await run('pm2', [
'reload',
'ecosystem.config.cjs',
'--only',
RESTART_TARGETS.join(','),
'--update-env',
])
await notifyDeployCompleted(push, diff) await notifyDeployCompleted(push, diff)
} catch (error) { } catch (error) {