-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (28 loc) · 1.02 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
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 "MAILER_EMAIL=${{ secrets.MAILER_EMAIL }}" >> $GITHUB_ENV
echo "MAILER_PASSWORD=${{ secrets.MAILER_PASSWORD }}" >> $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