From a9c69c47bcf16d2da4c3ec48c62b5abbcc3666ea Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 22 Jun 2024 19:28:05 -0400 Subject: [PATCH] Simplify deploy script --- deploy.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/deploy.ts b/deploy.ts index 14478ef..b4f69ae 100755 --- a/deploy.ts +++ b/deploy.ts @@ -4,22 +4,8 @@ import { $ } from "bun"; await $`bun run clean`; await $`bun run build`; -process.stdout.write("Profile: "); - -let profile = ""; -for await (const line of console) { - profile = line; - break; -} +const profile = prompt("Profile:"); +const distId = prompt("Distribution Id:"); await $`aws s3 sync ./.vitepress/dist/ s3://mjfs.us --acl public-read --delete --profile ${profile} --region us-west-1`; - -process.stdout.write("Distribution Id: "); - -let distId = ""; -for await (const line of console) { - distId = line; - break; -} - await $`aws cloudfront create-invalidation --distribution-id ${distId} --paths '/*' --profile ${profile}`;