diff --git a/src/deploy-webon/deploy-webon.ts b/src/deploy-webon/deploy-webon.ts index 6efbf80..951bfd5 100644 --- a/src/deploy-webon/deploy-webon.ts +++ b/src/deploy-webon/deploy-webon.ts @@ -1,7 +1,30 @@ import { checkNotDir, logFatal } from "../util/util"; +import { nomoCliConfig } from "../../nomo_cli.config"; -export async function deployWebOn(args: { archive: string }) { - checkNotDir(args.archive); +export async function deployWebOn(args: { + deployTarget: string; + archive: string; +}) { + const { deployTarget, archive } = args; - logFatal("deployWebOn not implemented: " + JSON.stringify(args)); + checkNotDir(archive); + + const targetConfig = nomoCliConfig.deployTargets[deployTarget]; + + if (!targetConfig) { + logFatal(`Invalid deployTarget: ${deployTarget}`); + return; + } + + const { rawSSH } = targetConfig; + const { sshHost, sshBaseDir, publicBaseUrl, sshPort } = rawSSH; + + // Use the deployment configuration to perform the deployment logic + // Replace this with your actual deployment logic + console.log(`Deploying to ${deployTarget}...`); + console.log(`SSH Host: ${sshHost}`); + console.log(`SSH Base Directory: ${sshBaseDir}`); + console.log(`Public Base URL: ${publicBaseUrl}`); + console.log(`SSH Port: ${sshPort || "default"}`); + console.log(`Archive Path: ${archive}`); }