-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.46 KB
/
Copy pathdeploy-lambda.yml
File metadata and controls
57 lines (47 loc) · 1.46 KB
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
48
49
50
51
52
53
54
55
56
57
name: Deploy Lambda Worker
on:
push:
branches:
- main
paths:
- 'lambda-worker/**'
- '.github/workflows/deploy-lambda.yml'
workflow_dispatch: # Allow manual triggers
env:
AWS_REGION: us-east-1
NODE_VERSION: '18'
jobs:
deploy:
name: Deploy Lambda Worker
runs-on: ubuntu-latest
environment: Staging
defaults:
run:
working-directory: lambda-worker
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: lambda-worker/package-lock.json
- 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.AWS_REGION }}
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build
- name: Install Serverless Framework
run: npm install -g serverless@3
- name: Deploy with Serverless
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
GOOGLE_GEMINI_API_KEY: ${{ secrets.GOOGLE_GEMINI_API_KEY }}
run: serverless deploy --verbose --stage staging