Skip to content

Commit 4c7ecd2

Browse files
committed
Create API lambda deploy workflow
1 parent eb13a5b commit 4c7ecd2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy API Lambda
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build-api-lambda.yml
11+
12+
deploy:
13+
runs-on: ubuntu-latest
14+
needs: build
15+
environment: docs-api-edge
16+
env:
17+
ZIP_FILE: api-lambda.zip
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Download bootstrap binary
21+
uses: actions/download-artifact@v4
22+
with:
23+
name: api-lambda-binary
24+
25+
- name: Download bootstrap binary
26+
uses: actions/download-artifact@v4
27+
with:
28+
name: api-lambda-binary # Defined in build-api-lambda.yml
29+
30+
- name: Create zip
31+
run: |
32+
zip -j "${ZIP_FILE}" ./bootstrap
33+
34+
- uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
35+
with:
36+
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-api-deployer-edge
37+
aws-region: us-east-1
38+
39+
- name: Upload Lambda function
40+
run: |
41+
aws lambda update-function-code \
42+
--function-name elastic-docs-v3-edge-api \
43+
--zip-file "fileb://${ZIP_FILE}"

0 commit comments

Comments
 (0)