-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.42 KB
/
deploy-email-function.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
name: Deploy email-function
on:
push:
branches:
- main
paths:
- .github/workflows/deploy-email-function.yml
- .github/workflows/build-email-function.yml
- bun-packages/**
jobs:
build:
uses: ./.github/workflows/build-email-function.yml
deploy:
runs-on: ubuntu-22.04
# Related
# - https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
# - https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps
permissions:
id-token: write # Required for aws-actions/configure-aws-credentials
contents: read # Required for aws-actions/configure-aws-credentials
needs: [build]
steps:
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
role-to-assume: arn:aws:iam::197170241226:role/github-actions
aws-region: eu-central-1
- name: Retrieve email-function artifact
uses: actions/[email protected]
with:
name: email-function-dist
path: bun-packages/packages/email-function/dist
- name: Prepare ZIP
run: zip --recurse-paths dist.zip dist
working-directory: bun-packages/packages/email-function/
- name: Deploy
run: aws lambda update-function-code --function-name email-function --zip-file fileb://dist.zip
working-directory: bun-packages/packages/email-function/