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()
|
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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user