-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (24 loc) · 792 Bytes
/
Copy pathmain.yml
File metadata and controls
26 lines (24 loc) · 792 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
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '20'
- 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: ap-south-1
- name: deploy
run: |
exclusion_patterns=$(cat exclusion-patterns.txt | tr '\n' '|')
zip -r deploy.zip $(git ls-files | grep -v -E "$exclusion_patterns" | tr '\n' ' ')
aws lambda update-function-code --function-name=lamda-test-1 --zip-file=fileb://deploy.zip