deploy self
This commit is contained in:
@@ -1,24 +1,17 @@
|
||||
import hash from "object-hash";
|
||||
import { $ } from "bun";
|
||||
import path from "path";
|
||||
import { config } from "./config";
|
||||
import { config, indexedConfig } from "./config";
|
||||
|
||||
type DeployInstance = {
|
||||
host: string;
|
||||
user: string;
|
||||
repo: string;
|
||||
branch: string;
|
||||
commitHash: string;
|
||||
port: number;
|
||||
};
|
||||
|
||||
export const deploy = async ({
|
||||
host,
|
||||
user,
|
||||
repo,
|
||||
branch,
|
||||
port,
|
||||
commitHash,
|
||||
}: DeployInstance) => {
|
||||
export const deploy = async ({ host, commitHash }: DeployInstance) => {
|
||||
const service = config.services[host];
|
||||
const { user, repo, branch, port } = indexedConfig[hash(service)];
|
||||
|
||||
const deploymentId = new Date().toISOString();
|
||||
|
||||
const serviceDir = path.join(config.directory, host);
|
||||
|
||||
Reference in New Issue
Block a user