-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.07 KB
/
deploy_lambda.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
41
42
43
44
45
46
47
name: Deploy Lambda
on:
push:
branches:
- main
paths:
- "pytest.ini"
- ".pytest.ini"
- "pyproject.toml"
- "pyproject.lock"
- "tests/**"
- "*.py"
- "app/**"
- ".github/workflows/deploy_lambda.yml"
jobs:
sam-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: |
pip install poetry
poetry install --no-interaction
- name: Run tests
run: poetry run pytest
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- uses: aws-actions/setup-sam@v2
- name: SAM Build
run: ./scripts/build-sam.sh
- name: SAM Deploy
run: |
cd deploy/aws_sam
sam deploy \
--no-confirm-changeset \
--no-fail-on-empty-changeset