Skip to content

Deploy

Deploy #1

Workflow file for this run

name: "Lambda deployment"
on:
push:
branches:
- main
paths:
- "lambda/**"
jobs:
deploy-lambda:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r lambda/requirements.txt -t lambda/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy Lambda function
run: |
cd lambda
zip -r function.zip .
aws lambda update-function-code --function-name lambda_function.py --zip-file fileb://function.zip
rm function.zip