Skip to content

Commit

Permalink
Add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed May 3, 2024
1 parent e58daa1 commit aa96779
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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: |
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 }}

0 comments on commit aa96779

Please sign in to comment.