-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.76 KB
/
deploy.yml
File metadata and controls
62 lines (58 loc) · 1.76 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy
on:
# Uncomment one of these to deploy ALL stacks to AWS
# NOTE: Uncomment only one to avoid duplicate deployments on the same event
# release: # on publishing new release
# types: [published]
# push: # on push to main
# branches: [main]
# pull_request: # on merging pull requests to main (closed includes unmerged; deploy job guards with merged == true)
# branches: [main]
# types: [closed]
workflow_dispatch:
inputs:
stack:
description: "CDK stack to deploy"
required: true
type: choice
options:
- all
- agent
- api
- eventbridge
- graphql
- s3
- stream
- sqs
permissions:
id-token: write
contents: read
jobs:
check:
uses: ./.github/workflows/check.yml
deploy:
needs: check
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
stack: [agent, api, eventbridge, graphql, s3, sqs, stream]
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: make poetry install
- name: Install AWS CDK CLI
run: npm install -g aws-cdk
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
- name: Deploy stack
if: github.event_name != 'workflow_dispatch' || inputs.stack == 'all' || contains(inputs.stack, matrix.stack)
run: make deploy STACK=${{ matrix.stack }}