From 25bdee16b97b475eb6e89364eaee0bd4eb646c60 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 7 Jul 2022 14:49:33 +0100 Subject: [PATCH] static HTML for S3 deployment (#1581) * static HTML for S3 deployment * deploy `.out` folder --- .github/workflows/deploy.yml | 2 +- package.json | 1 + scripts/deploy-s3.sh | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 65a7f324e..7f73fb655 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-node@v2 - run: npm ci --legacy-peer-deps - - run: npm run build + - run: npm run build:static env: NEXT_PUBLIC_INFURA_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_INFURA_PROJECT_ID }} diff --git a/package.json b/package.json index 9dab7fb5e..004885cde 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "npm run pregenerate && next dev -p 8000", "build": "npm run pregenerate && next build", + "build:static": "npm run build && next export", "serve": "serve -s public/", "pregenerate": "bash scripts/pregenerate.sh", "test": "npm run pregenerate && npm run lint && npm run type-check && npm run jest", diff --git a/scripts/deploy-s3.sh b/scripts/deploy-s3.sh index 03c3d59dd..81ec07c37 100755 --- a/scripts/deploy-s3.sh +++ b/scripts/deploy-s3.sh @@ -10,7 +10,7 @@ AWS_S3_BUCKET="www-market" set -e; function s3sync { - aws s3 sync ./public s3://"$1" \ + aws s3 sync ./out s3://"$1" \ --include "*" \ --exclude "*.html" \ --exclude "sw.js" \ @@ -24,7 +24,7 @@ function s3sync { --delete \ --acl public-read - aws s3 sync ./public s3://"$1" \ + aws s3 sync ./out s3://"$1" \ --exclude "*" \ --include "*.html" \ --include "sw.js" \