Skip to content

Add GitHub Actions workflow #1

Add GitHub Actions workflow

Add GitHub Actions workflow #1

Workflow file for this run

name: Deploy to AWS Lambda
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
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: aws-actions/aws-lambda-deploy@v1
with:
command: "deploy"
function-name: "dev-lta-datasets-updater"
zip-file: "deployment_package.zip"
region: "ap-southeast-1"
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}