Files
pulse-api/.gitea/workflows/deploy-prod.yml
Cosmo 30a894a78f
Some checks failed
CI / lint-test (push) Failing after 2m9s
CI / lint-test (pull_request) Failing after 25s
ci: add lint, coverage check and proper deploy workflow
2026-03-26 18:33:43 +00:00

26 lines
710 B
YAML

name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy pulse-api
run: |
cd /opt/digital-home/homelab-api
docker compose pull
docker compose up -d --build
echo "Waiting for healthcheck..."
sleep 5
STATUS=$(docker inspect --format='{{.State.Health.Status}}' homelab-api 2>/dev/null || echo "no-healthcheck")
echo "Container status: $STATUS"
if [ "$STATUS" = "unhealthy" ]; then
echo "::error::Container is unhealthy after deploy"
docker logs homelab-api --tail=20
exit 1
fi
echo "Deploy successful!"