Skip to content

Add GitHub Actions workflow #2

Add GitHub Actions workflow

Add GitHub Actions workflow #2

Workflow file for this run

name: Deploy to AWS Lambda
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: Preview
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Package application
run: |
mkdir deployment_package
cp -r * deployment_package/
cd deployment_package
zip -r ../deployment_package.zip .
- name: Deploy to AWS Lambda
uses: appleboy/[email protected]
with:
function_name: "dev-lta-datasets-updater"
zip-file: "deployment_package.zip"
aws_region: "ap-southeast-1"
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}