Create github action for deploying to AWS Lambda #1
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 to lambda | |
on: [push] | |
jobs: | |
deploy_source: | |
name: build and deploy lambda | |
strategy: | |
matrix: | |
python-version: [3.10] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: python install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: zip | |
uses: montudor/action-zip@v1 | |
with: | |
args: zip -qq -r ./bundle.zip ./ | |
- name: default lambda deploy | |
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_REGION }} | |
function_name: congress-trades | |
zip_file: bundle.zip |