- All dependencies now in pyproject.toml [project.dependencies] - Dev/test deps in [project.optional-dependencies] dev and [tool.uv] - Dockerfile uses uv pip install . from pyproject.toml - CI uses uv pip install ".[dev]" - Deleted requirements.txt and requirements-dev.txt - Updated README, CLAUDE.md install instructions - Enhanced .dockerignore (exclude tests, docs, infra from image)
67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install dependencies
|
|
run: uv pip install --system ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: pytest tests/ -v --tb=short
|
|
env:
|
|
TESTING: "1"
|
|
|
|
build-and-push:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository }}:latest
|
|
|
|
deploy-production:
|
|
needs: build-and-push
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: "3.3"
|
|
|
|
- name: Install Kamal
|
|
run: gem install kamal
|
|
|
|
- name: Deploy
|
|
run: kamal deploy
|
|
env:
|
|
KAMAL_REGISTRY_USERNAME: ${{ github.actor }}
|
|
KAMAL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|