mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-09-30 20:33:14 +00:00
20 lines
556 B
Bash
20 lines
556 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
cd web
|
||
|
|
npm ci
|
||
|
|
npm run build
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
BUCKET=$(aws cloudformation describe-stacks \
|
||
|
|
--stack-name proposal-system-frontend \
|
||
|
|
--query "Stacks[0].Outputs[?OutputKey=='SiteBucketName'].OutputValue" \
|
||
|
|
--output text)
|
||
|
|
aws s3 sync web/dist "s3://$BUCKET" --delete
|
||
|
|
|
||
|
|
DIST_ID=$(aws cloudformation describe-stacks \
|
||
|
|
--stack-name proposal-system-frontend \
|
||
|
|
--query "Stacks[0].Outputs[?OutputKey=='DistributionId'].OutputValue" \
|
||
|
|
--output text)
|
||
|
|
aws cloudfront create-invalidation --distribution-id "$DIST_ID" --paths "/*"
|