update: Refactored downloading of documents/logo #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy AWS Lambda" | |
on: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
jobs: | |
deploy-lambda: | |
if: ${{ github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10.6' | |
- name: Install dependencies | |
run: | | |
cd lambda_handlers | |
mkdir package | |
pip install \ | |
--platform manylinux2014_x86_64 \ | |
--target=package \ | |
--implementation cp \ | |
--python-version 3.10 \ | |
--only-binary=:all: --upgrade \ | |
pillow boto3 | |
- name: Zip the package | |
run: | | |
cd lambda_handlers/package | |
zip -r ../lambda_function.zip . | |
cd .. | |
zip lambda_function.zip lambda_function.py | |
- name: Deploy to AWS Lambda | |
uses: appleboy/[email protected] | |
with: | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws_region: ${{ secrets.AWS_DEFAULT_REGION }} | |
function_name: ${{ secrets.AWS_LAMBDA_FUNCTION_NAME }} | |
zip_file: lambda_handlers/lambda_function.zip | |
runtime: python3.10 |