forked from BiteSizeAcademy/github-action-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 799 Bytes
/
main.yml
File metadata and controls
31 lines (29 loc) · 799 Bytes
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
name: Deploy
on:
push:
branches:
- master
jobs:
deploy_lambda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-south-1
- name: npm install
env:
CI: true
run: |
npm ci
- name: deploy
run: |
npx ncc build index.ts
zip -j deploy.zip ./dist/*
aws lambda update-function-code --function-name=test_lambda1 --zip-file=fileb://deploy.zip