Skip to content

Merge pull request #1471 from CityOfPhiladelphia/staging #360

Merge pull request #1471 from CityOfPhiladelphia/staging

Merge pull request #1471 from CityOfPhiladelphia/staging #360

Workflow file for this run

name: Deploy router updates to prod
on:
push:
branches:
- main
jobs:
build:
name: Run lambda and invalidate cloudfront
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@master
- name: test
run: |
npm install
npm test
- name: run deploy shell script
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
./deploy.sh ${{ secrets.PROD_LAMBDA_NAME }} ${{ secrets.PROD_LAMBDA_ROLE }} ${{ secrets.PROD_S3_BUCKET }} ${{ secrets.PROD_CLOUDFRONT_DISTRIBUTION_ID }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.PROD_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"