hard code s3 bucket region #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Next Version | |
on: | |
push: | |
branches: | |
- next | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Redirect 404 to Index for SPA | |
run: cp dist/index.html dist/404.html | |
- name: Deploy | |
uses: reggionick/s3-deploy@v4 | |
with: | |
folder: dist | |
bucket: "${{ secrets.S3_BUCKET }}" | |
bucket-region: us-east-1 | |
dist-id: "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" | |
invalidation: / | |
delete-removed: true | |
no-cache: true | |
private: true | |
files-to-include: "{.*/**,**}" |