Skip to content

Merge pull request #16 from JuliaDeNadai/cd #14

Merge pull request #16 from JuliaDeNadai/cd

Merge pull request #16 from JuliaDeNadai/cd #14

name: CD
on:
push:
branches:
- main
jobs:
continuous-deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Versão do Node.js
- name: Install dependencies
run: npm install
- name: Compile TypeScript
run: npm run build
- name: Zip Files
run: |
cd dist
zip -r ../deployment.zip .
cd ..
zip -r deployment.zip node_modules package.json package-lock.json
- name: Send to Lambda
uses: appleboy/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: brainAgriculture
zip_file: deployment.zip