name: Deploy Development

on:
  push:
    branches: [develop]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to Development
        run: |
          set -e
          echo "=== Deploying to DEVELOPMENT ==="
          cd /home/lars/docker/bodytrack-dev
          git fetch origin develop
          git reset --hard origin/develop
          docker compose -f docker-compose.dev-env.yml build --no-cache
          docker compose -f docker-compose.dev-env.yml up -d
          sleep 5
          curl -sf http://localhost:8099/api/auth/status && echo "✓ DEV API healthy"
          echo "=== DEV Deploy complete ==="
