static HTML for S3 deployment (#1581)

* static HTML for S3 deployment

* deploy `.out` folder
This commit is contained in:
Matthias Kretschmann 2022-07-07 14:49:33 +01:00 committed by GitHub
parent f8bbda0594
commit 25bdee16b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -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 }}

View File

@ -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",

View File

@ -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" \