forked from stratospheric-dev/stratospheric
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) 路 1.03 KB
/
email-forward-handler.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
38
39
40
41
42
name: Email Forward Handler
on:
push:
paths:
- 'utility/email/**'
jobs:
build:
runs-on: ubuntu-20.04
name: Build and deploy AWS lambda
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0
- name: Set up Node 16
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Gradle cache
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build and deploy the function
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
working-directory: utility/email
run: |
sudo npm install -g serverless
npm install
./gradlew buildZip
serverless deploy