-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 875 Bytes
/
worker.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
name: AWS Worker
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: worker
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Include node modules on lambda package
run: mv node_modules build/node_modules
- name: Create lambda package
run: (cd build && zip -r ../function.zip .)
- name: Deploy to AWS
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: fetchWeather
zip_file: worker/function.zip