Skip to content

Update module type.

Update module type. #7

Workflow file for this run

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