Deploy #45
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: Tests | |
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 Deploy | |
run: | | |
python -m venv .venv | |
. .venv/bin/activate | |
pip install -r requirements.txt | |
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4 | |
#python runner.py | |
working-directory: ./app # Change this to your project's root directory | |
# - name: Deploy | |
# run: | | |
# gunicorn -w 2 app:app | |
# # python src/app.py |