Skip to content

Merge pull request #1 from chat-apropo/add-flyctl-cd #5

Merge pull request #1 from chat-apropo/add-flyctl-cd

Merge pull request #1 from chat-apropo/add-flyctl-cd #5

Workflow file for this run

name: G4F API
on: [push]
jobs:
build:
name: Test and Lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Run tests
run: python -m pytest tests/
- name: Lint with Ruff
run: ruff --output-format=github .
continue-on-error: true
deploy:
name: Deploy app
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}