Skip to content

Commit 9529e0f

Browse files
committed
Mostly working
1 parent ce28d17 commit 9529e0f

30 files changed

+37000
-7626
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
25+
.env

deploy.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
set -e
2+
rm -rf build
3+
npm run build
4+
5+
S3_BUCKET_NAME=chessgpt
6+
7+
# Sync all files except for index
8+
echo "Uploading files to $S3_BUCKET_NAME..."
9+
aws s3 sync ./build s3://$S3_BUCKET_NAME/ \
10+
--acl public-read \
11+
--cache-control max-age=31536000 \
12+
--exclude index.html \
13+
--profile blog-deployer
14+
15+
# Upload index.html
16+
echo "Uploading index.html"
17+
aws s3 cp ./build/index.html s3://$S3_BUCKET_NAME/index.html \
18+
--metadata-directive REPLACE \
19+
--cache-control max-age=0,no-cache,no-store,must-revalidate \
20+
--content-type text/html \
21+
--acl public-read \
22+
--profile blog-deployer

0 commit comments

Comments
 (0)