Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/deploy-api-lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy API Lambda
on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/build-api-lambda.yml

deploy:
runs-on: ubuntu-latest
needs: build
environment: docs-api-edge
env:
ZIP_FILE: api-lambda.zip
steps:
- uses: actions/checkout@v4
- name: Download bootstrap binary
uses: actions/download-artifact@v4
with:
name: api-lambda-binary

- name: Download bootstrap binary
uses: actions/download-artifact@v4
with:
name: api-lambda-binary # Defined in build-api-lambda.yml

- name: Create zip
run: |
zip -j "${ZIP_FILE}" ./bootstrap

- uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
with:
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-api-deployer-edge
aws-region: us-east-1

- name: Upload Lambda function
run: |
aws lambda update-function-code \
--function-name elastic-docs-v3-edge-api \
--zip-file "fileb://${ZIP_FILE}"
Loading