Repository navigation
59 lines (51 loc) · 1.93 KB
/
Copy pathdeploy.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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN }}
aws-region: us-east-1
- name: Set up uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
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 }}