mitai-jinkendo/.gitea/workflows/deploy.yml
Lars Stommer 89b6c0b072
Some checks are pending
Deploy to Raspberry Pi / deploy (push) Waiting to run
Build Test / build-frontend (push) Waiting to run
Build Test / lint-backend (push) Waiting to run
feat: initial commit – Mitai Jinkendo v9a
2026-03-16 13:35:11 +01:00

39 lines
1.0 KiB
YAML

name: Deploy to Raspberry Pi
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
script: |
set -e
cd /home/lars/docker/mitai
echo "=== Pulling latest code ==="
git pull origin main
echo "=== Rebuilding containers ==="
docker compose build --no-cache
echo "=== Restarting ==="
docker compose up -d
echo "=== Health check ==="
sleep 5
docker ps | grep jinkendo
curl -sf http://localhost:8002/api/auth/status | python3 -c "import sys,json; d=json.load(sys.stdin); print('✓ API healthy')" || echo "⚠ API check failed"
echo "=== Deploy complete ==="