diff --git a/webhook.cjs b/webhook.cjs index 500f1df..b383f72 100644 --- a/webhook.cjs +++ b/webhook.cjs @@ -560,9 +560,17 @@ async function deploy(push) { promoteBuiltDist() syncVehicleIcons() - for (const target of RESTART_TARGETS) { - await run('pm2', ['reload', target, '--update-env']) - } + // Reload via the ecosystem file (not by bare name) with --only so each deploy + // re-reads the committed env blocks (e.g. VEHICLE_* paths). `pm2 reload + // --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) } catch (error) {