Skip to content

whoops

whoops #50

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Create .env file
run: |
echo "AIRTABLE_TOKEN='${{ secrets.AIRTABLE_TOKEN }}'" > .env
echo "AIRTABLE_TOKEN='${{ secrets.AIRTABLE_BASE }}'" >> .env
echo "AIRTABLE_TOKEN='${{ secrets.AGOL_API_KEY }}'" >> .env
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- 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-east-1 # Adjust this to your S3 bucket's region
- name: Upload to S3
run: |
aws s3 sync dist/ s3://crf-matching
- name: Invalidate CloudFront
run: |
aws cloudfront create-invalidation \
--distribution-id E6AN64MGEH6XD \
--paths "/*"