Skip to content

feat: 🎸 update polyfill host #10

feat: 🎸 update polyfill host

feat: 🎸 update polyfill host #10

name: Build and deploy to production.
env:
AWS_REGION: us-east-2
APP_ENV: prod
on:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-latest
if: github.repository_owner == 'fox-one'
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.PAT }}
submodules: true
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn build
# upload to aws
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ env.AWS_REGION }}
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_ACCESS_KEY_SECRET }}
- run: aws s3 cp --recursive dist ${{ secrets.S3_URL_PROD }} --acl public-read
- run: aws s3 cp dist/index.html ${{ secrets.S3_URL_PROD }} --cache-control "no-cache" --acl public-read