mirror of https://github.com/mitchell/mjfs-us.git
Simplify deploy script
This commit is contained in:
parent
0f77e9bd0d
commit
a9c69c47bc
18
deploy.ts
18
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}`;
|
||||
|
|
Loading…
Reference in New Issue