diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml new file mode 100644 index 0000000..a14d96c --- /dev/null +++ b/.github/workflows/static.yaml @@ -0,0 +1,24 @@ +on: + push: + branches: + - static + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: | + yarn install + yarn build + + deploy: + runs-on: ubuntu-latest + steps: + - name: Upload to S3 + run: aws s3 cp ./out s3://$AWS_S3_BUCKET --acl public-read --delete --exclude '.git/*' + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/next.config.js b/next.config.js index 767719f..8e81e6a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,6 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + output: 'export', +} module.exports = nextConfig