Update ClimaTempo engine. #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |