-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (30 loc) · 1.23 KB
/
main.yml
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
name: deploy to lambda
on:
push:
branches: main
jobs:
lambda-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup node environment
uses: actions/setup-node@v1
with:
node-version: 16
- name: Set environment variables
run: |
echo "EXPLARA_EMAIL=${{ secrets.EXPLARA_EMAIL }}" >> $GITHUB_ENV
echo "EXPLARA_PASSWORD=${{ secrets.EXPLARA_PASSWORD }}" >> $GITHUB_ENV
echo "GMAIL_EMAIL_ADDRESS=${{ secrets.GMAIL_EMAIL_ADDRESS }}" >> $GITHUB_ENV
echo "GMAIL_API_CLIENT_ID=${{ secrets.GMAIL_API_CLIENT_ID }}" >> $GITHUB_ENV.
echo "GMAIL_API_CLIENT_SECRET=${{ secrets.GMAIL_API_CLIENT_SECRET }}" >> $GITHUB_ENV
echo "GMAIL_API_REFRESH_TOKEN=${{ secrets.GMAIL_API_REFRESH_TOKEN }}" >> $GITHUB_ENV
- name: Install serverless globally
run: npm install -g serverless
- name: Configure serverless authentication
run: sls config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install npm dependencies
run: npm ci
- name: Deploy lambda function
run: sls deploy