Skip to content

chore: add manual deployment option #31

chore: add manual deployment option

chore: add manual deployment option #31

name: Deploy to AWS Lambda
on:
push:
branches:
- main
workflow_dispatch:
env:
SERVICE: gmail-plugin
STAGE: prod
REGION: eu-central-1
jobs:
deploy:
name: Deploy to AWS Lambda
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install project dependencies
run: npm install
- name: Build project artifacts
run: npm run build
- name: Install serverless CLI
run: npm install serverless -g
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.REGION }}
- name: Deploy project artifacts to AWS Lambda
id: deploy
run: serverless deploy --stage ${{ env.STAGE }} --region ${{ env.REGION }}
- name: Get plugin server URL
run: |
VALUE=`aws cloudformation describe-stacks --stack-name ${{ env.SERVICE }}-${{ env.STAGE }} --query "Stacks[0].Outputs[?OutputKey=='HttpApiUrl'].OutputValue" --output text`
echo "Please make sure to update the PLUGIN_SERVER_URL environment variable of the Lambda function with the following value: $VALUE"