-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.17 KB
/
deploy-staging.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
name: Deploy AWS CDK to staging
on:
push:
branches: [staging]
jobs:
deploy-staging-to-aws:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install CDK and Python dependencies
run: |
npm install -g aws-cdk
python -m pip install --upgrade pip pdm
# Create the virtual environment and install the locked packages from pdm.lock
# --production used to not install all the development packages, not needed here
pdm install --production
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: "us-east-2"
- name: Deploy to AWS
# Running with 'pdm run' makes the virtual environment active and then runs cdk
run: pdm run cdk deploy --require-approval=never