mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added fastapi depoyment actions
This commit is contained in:
parent
b42ba30e4e
commit
f60b5b2e57
1 changed files with 36 additions and 0 deletions
36
.github/workflows/deploy_fastapi_backend.yml
vendored
Normal file
36
.github/workflows/deploy_fastapi_backend.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Serverless Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev, prod ]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.10
|
||||
|
||||
- name: Install Serverless
|
||||
run: npm install -g serverless
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements/base.txt
|
||||
|
||||
- name: AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: eu-west-2
|
||||
|
||||
- name: Deploy to AWS Lambda via Serverless
|
||||
run: sls deploy --stage ${{ github.ref_name }}
|
||||
Loading…
Add table
Reference in a new issue