Skip to content

Commit

Permalink
First configs for deployment test
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2-nomo committed Nov 20, 2023
1 parent f72f43b commit 443fae8
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/deploy-webon/deploy-webon.ts
Original file line number Diff line number Diff line change
@@ -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}`);
}

0 comments on commit 443fae8

Please sign in to comment.