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 clean`;
|
||||||
await $`bun run build`;
|
await $`bun run build`;
|
||||||
|
|
||||||
process.stdout.write("Profile: ");
|
const profile = prompt("Profile:");
|
||||||
|
const distId = prompt("Distribution Id:");
|
||||||
let profile = "";
|
|
||||||
for await (const line of console) {
|
|
||||||
profile = line;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
await $`aws s3 sync ./.vitepress/dist/ s3://mjfs.us --acl public-read --delete --profile ${profile} --region us-west-1`;
|
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}`;
|
await $`aws cloudfront create-invalidation --distribution-id ${distId} --paths '/*' --profile ${profile}`;
|
||||||
|
|
Loading…
Reference in New Issue