Skip to content

Merge pull request #1 from cagov/hypermedia-api #6

Merge pull request #1 from cagov/hypermedia-api

Merge pull request #1 from cagov/hypermedia-api #6

Workflow file for this run

name: Production deployment
on:
push:
branches:
- main
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build
run: |
npm install
npm run widget:build
npm run widget:build:preview
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Deploy to S3
run: aws s3 sync ./widget/dist s3://cdn.innovation.ca.gov/br/ --follow-symlinks
- name: Invalidate Cloudfront
env:
AWS_RETRY_MODE: standard
AWS_MAX_ATTEMPTS: 6
run: aws cloudfront create-invalidation --distribution-id EAQBFZOLKQ2AZ --paths "/br/*"