Don't load maps async (#88) #199
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 | |
on: | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: npm install dependencies | |
run: npm install | |
- name: run prettier | |
run: npm run prettier | |
- name: run tslint | |
run: npm run lint | |
- name: run tests | |
run: npm run test | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }} | |
ROOT_URL: https://polls.pizza | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: install dependencies | |
run: npm install | |
- name: build the site | |
run: npm run build | |
env: | |
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }} | |
NODE_ENV: prod | |
PIZZA_BASE_DOMAIN: https://base.polls.pizza | |
- name: Push the site to S3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.PROD_BUCKET }} | |
AWS_REGION: "us-west-2" | |
SOURCE_DIR: "dist/www" | |
- name: publish to bugsnag | |
run: npm run bugsnag | |
- name: Bugsnag Release | |
uses: psprings/[email protected] | |
with: | |
apiKey: ${{ secrets.BUGSNAG_KEY }} | |
releaseStage: prod | |
- name: Invalidate cache & wait for completion | |
uses: muratiger/invalidate-cloudfront-and-wait-for-completion-action@master | |
env: | |
AWS_REGION: "us-east-1" | |
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }} | |
PATHS: "/*" |