We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18112c8 commit 3501154Copy full SHA for 3501154
2 files changed
.gitignore
@@ -41,9 +41,6 @@ yarn-error.log*
41
*.tsbuildinfo
42
next-env.d.ts
43
44
-# scripts
45
-deploy.sh
46
-
47
# optional: OS/system files
48
Thumbs.db
49
.idea/
deploy.sh
@@ -0,0 +1,14 @@
1
+#!/bin/bash
2
+set -e
3
+
4
+# Load environment variables from .env file
5
+export $(grep -v '^#' .env | xargs)
6
7
+# Build the project
8
+yarn build
9
10
+# Sync build output to S3
11
+aws s3 sync ./out "s3://$S3_BUCKET/" --delete
12
13
+# Invalidate CloudFront cache
14
+aws cloudfront create-invalidation --distribution-id "$CLOUDFRONT_DISTRIBUTION_ID" --paths "/*"
0 commit comments