Django 5.2 with dev/test/prod settings, SQLite tuned for Litestream (WAL, IMMEDIATE transactions), ULID primary keys via a shared base model, and a custom User model ahead of the first migration. Minimal accessible base template with dark mode via color-scheme and an optional theme picker. /healthz answers before host validation so Fly checks pass. Dockerfile (dev and prod targets), compose for local dev, fly.toml with placeholder app/region, Litestream backups to B2, and a Forgejo Actions workflow. Migrations run in bin/start because Fly release machines don't mount volumes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
802 B
YAML
30 lines
802 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
# Adjust to match the labels of your Forgejo runner.
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
|
- uses: https://github.com/astral-sh/setup-uv@v6
|
|
with:
|
|
version: "0.13.6"
|
|
- run: uv sync --locked
|
|
- run: uv run ruff check .
|
|
- run: uv run ruff format --check .
|
|
- run: uv run pytest
|
|
|
|
deploy:
|
|
needs: test
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
|
- uses: https://github.com/superfly/flyctl-actions/setup-flyctl@master
|
|
- run: flyctl deploy --remote-only
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|