🌳
pt0/nextF/deployF/deployNextAppF.mts
2import { klusterCtx, type KlusterCfg } from '../../deployF/k8sF/ctxF/klusterCtxF.mts'
6import { appCfgCtx, type AppCfg } from '../../deployF/k8sF/ctxF/appCfgCtxF.mts'
11export const deployNextApp = async (appConfig: AppCfg) => {
12 klusterCtx.enterWith(appConfig as KlusterCfg)
14 const {wcHostname} = appConfig
16 const kube_extHostname = getAnyHostname(appConfig)
18 Object.assign(appConfig, {kube_extHostname})
20 if (!getIsDevAction(appConfig)) {
21 const match = kube_extHostname ? isWcDnsSuffix(kube_extHostname) : undefined
22 throwIf(() => wcHostname && !match, {kube_extHostname, match})
23 }
25 const returnedCfg = await syncBuildDeployNextApp(appConfig)
26 if (returnedCfg) Object.assign(appConfig, returnedCfg)
27 appCfgCtx.enterWith(appConfig)
29 if (getIsDevAction(appConfig)) return
33 await doPtDeployAction({isPostAction: true})