mirror of
https://codeberg.org/alicia/web-check.git
synced 2026-03-18 08:29:53 +01:00
Automate deployment to AWS lambda (cheaper than Netlify)
This commit is contained in:
parent
6d8b2368e7
commit
394b68fa29
2 changed files with 162 additions and 75 deletions
37
.github/workflows/deploy-aws.yml
vendored
Normal file
37
.github/workflows/deploy-aws.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: 🚀 Deploy to AWS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
paths:
|
||||
- api/**
|
||||
- serverless.yml
|
||||
- package.json
|
||||
|
||||
jobs:
|
||||
deploy-api:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Serverless CLI and dependencies
|
||||
run: |
|
||||
yarn add -g serverless
|
||||
yarn
|
||||
- name: Deploy to AWS
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
run: serverless deploy
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue