-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1023 Bytes
/
Deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}