Skip to content

Update to disable AWS lambda push and change dependency manager from … #2

Update to disable AWS lambda push and change dependency manager from …

Update to disable AWS lambda push and change dependency manager from … #2

name: Update Gateway lambdas (prod)
# Disabled for now. We need to add a current version of the functions to enable this.
#on:
# push:
# branches:
# - main
# paths:
# - 'apps/summerfi-api/**'
defaults:
run:
working-directory: ./apps/summerfi-api
jobs:
deploy_zip:
name: Deploy lambda functions from zip
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PROD_GW_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_GW_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.PROD_AWS_REGION }}
- name: Install dependencies
run: |
pnpm install
- name: Create bundle
run: |
pnpm run build
- name: Deploy portfolio-assets
uses: appleboy/lambda-action@v0.1.9
with:
function_name: summer-fi-portfolio-assets-prod
zip_file: ./apps/summerfi-api/artifacts/portfolio-assets.zip
dry_run: false
- name: Deploy portfolio-overview
uses: appleboy/lambda-action@v0.1.9
with:
function_name: summer-fi-portfolio-overview-prod
zip_file: ./apps/summerfi-api/artifacts/portfolio-overview.zip
dry_run: false
- name: Create cache invalidation
run: |
aws apigateway flush-stage-cache --rest-api-id ${{ secrets.PROD_API_GW_ID }} --stage-name prod