Skip to content

.github/workflows/lmbda-deploy.yml #14

.github/workflows/lmbda-deploy.yml

.github/workflows/lmbda-deploy.yml #14

Workflow file for this run

name: Deploy to AWS Lambda
on:
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install pnpm and Set Up Global Bin Directory
run: npm install -g pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build the project
run: pnpm turbo build --filter=api # Builds the project before deployment
- name: Deploy with Serverless
uses: serverless/github-action@v3
with:
args: -c "cd ./apps/api && serverless deploy"
entrypoint: /bin/sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SYGAR_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SYGAR_AWS_SECRET_ACCESS_KEY }}
SYGAR_DYNAMODB_REGION: ${{ secrets.SYGAR_DYNAMODB_REGION }}
SYGAR_AUTH_WEB_APP_URL: ${{ secrets.SYGAR_AUTH_WEB_APP_URL }}
SYGAR_PROJECT_NAME: ${{ secrets.SYGAR_PROJECT_NAME }}
NODE_ENV: ${{ secrets.NODE_ENV }}
SYGAR_ADMIN_EMAIL: ${{ secrets.SYGAR_ADMIN_EMAIL }}
SYGAR_ADMIN_PASSWORD: ${{ secrets.SYGAR_ADMIN_PASSWORD }}
SYGAR_USER_EMAIL: ${{ secrets.SYGAR_USER_EMAIL }}
SYGAR_USER_PASSWORD: ${{ secrets.SYGAR_USER_PASSWORD }}
SYGAR_JWT_SECRET_TOKEN: ${{ secrets.SYGAR_JWT_SECRET_TOKEN }}
SYGAR_JWT_EXPIRATION_TIME: ${{ secrets.SYGAR_JWT_EXPIRATION_TIME }}
SYGAR_MAILER_HOST: ${{ secrets.SYGAR_MAILER_HOST }}
SYAGR_MAILER_PORT: ${{ secrets.SYAGR_MAILER_PORT }}
SYGAR_MAILER_USERNAME: ${{ secrets.SYGAR_MAILER_USERNAME }}
SYGAR_MAILER_PASSWORD: ${{ secrets.SYGAR_MAILER_PASSWORD }}
SYGAR_MAILER_FROM_ADDRESS: ${{ secrets.SYGAR_MAILER_FROM_ADDRESS }}