fix(web): webhook reloads via ecosystem file so committed env (VEHICLE_*) applies on deploy
This commit is contained in:
+11
-3
@@ -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 <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)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user