-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.1 KB
/
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
on:
push:
branches: [ master ]
jobs:
deploy-Lambda-function:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setting up AWS Credentials
run: |
pip install awscli
aws configure set region us-east-1
aws configure set output json
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}}
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Create virtual environment
working-directory: ./aws-lambda
run: |
pip install virtualenv
python3 -m virtualenv venv
- name: Install requiremenents
working-directory: ./aws-lambda
run: |
. venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
deactivate
- name: Deploy
working-directory: ./aws-lambda
run: |
. venv/bin/activate
lambda deploy