-
Notifications
You must be signed in to change notification settings - Fork 235
59 lines (51 loc) · 1.93 KB
/
deploy.yml
File metadata and controls
59 lines (51 loc) · 1.93 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
name: Deploy application
on:
release:
types: [published]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: deployment
if: github.repository == 'developmentseed/titiler'
defaults:
run:
working-directory: deployment/aws
permissions:
id-token: write # AWS OIDC: exchange JWT for temporary credentials in configure-aws-credentials
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
# Let's wait a bit to make sure Pypi is up to date
- name: Sleep for 120 seconds
run: sleep 120s
shell: bash
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN }}
aws-region: us-east-1
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: false
- name: Install dependencies
run: uv sync --all-packages && npm install -g aws-cdk@^2.232.2
# Let's wait a bit to make sure package is available on pypi
- name: Sleep for 120 seconds
run: sleep 120s
shell: bash
# Build and Deploy CDK application
- name: Build & Deploy
run: uv run cdk deploy "${STACK_NAME}-lambda-${STACK_STAGE}" --require-approval never
env:
STACK_NAME: ${{ secrets.STACK_NAME }}
STACK_STAGE: ${{ secrets.STACK_STAGE }}
TITILER_STACK_NAME: ${{ secrets.STACK_NAME }}
TITILER_STACK_STAGE: ${{ secrets.STACK_STAGE }}
TITILER_STACK_MEMORY: ${{ secrets.STACK_MEMORY }}
TITILER_STACK_OWNER: ${{ secrets.STACK_OWNER }}
TITILER_STACK_CLIENT: ${{ secrets.STACK_CLIENT }}
TITILER_STACK_BUCKETS: ${{ secrets.STACK_BUCKETS }}