Skip to content

Deploy

Deploy #194

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
permissions:
contents: read
env:
MONGO_URI : ${{ secrets.MONGO_URI }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.9
- name: Setup CF
run: |
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb && sudo cloudflared service install ${{ secrets.CF_KEY }}
- name: Setup Dependencies
run: |
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
working-directory: ./app
- name: Deployments
run: |
. .venv/bin/activate
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
working-directory: ./app