-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.46 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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy to AWS
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install layers
run: |
cd src/layers/boto3
pip install -r requirements.txt -t python/lib/python3.11/site-packages/ \
--platform manylinux2014_x86_64 --only-binary=:all: --upgrade \
--no-compile --python-version 3.11 --implementation cp
cd ../sagemaker
pip install -r requirements.txt -t python/lib/python3.11/site-packages/ \
--platform manylinux2014_x86_64 --only-binary=:all: --upgrade \
--no-compile --python-version 3.11 --implementation cp
cd ../../..
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install AWS CDK
run: npm install -g aws-cdk
- name: Deploy with CDK
run: |
cdk deploy --all --require-approval never
env:
CDK_DEFAULT_ACCOUNT: ${{ secrets.AWS_ACCOUNT_ID }}
CDK_DEFAULT_REGION: 'us-east-1'
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: 'us-east-1'