-
Notifications
You must be signed in to change notification settings - Fork 22
32 lines (30 loc) · 911 Bytes
/
fly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Fly Deploy
on:
push:
branches:
- main
jobs:
pre-deploy-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: Test with python ${{ matrix.python-version }}
run: DATABASE_URL="sqlite+aiosqlite:///:memory:" uv run --frozen pytest
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: pre-deploy-test
concurrency: deploy-group # optional: ensure only one action runs at a time
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 }}