ci(deploy): fix mounted host path #3
@@ -8,17 +8,18 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Deploy pulse-api
|
- name: Deploy pulse-api
|
||||||
run: |
|
run: |
|
||||||
cd /opt/digital-home/homelab-api
|
cd /opt/digital-home/homelab-api
|
||||||
docker compose pull
|
|
||||||
docker compose up -d --build
|
docker compose up -d --build
|
||||||
echo "Waiting for healthcheck..."
|
echo "Waiting for container..."
|
||||||
sleep 5
|
sleep 5
|
||||||
STATUS=$(docker inspect --format='{{.State.Health.Status}}' homelab-api 2>/dev/null || echo "no-healthcheck")
|
STATUS=$(docker inspect --format='{{.State.Status}}' homelab-api 2>/dev/null || echo "unknown")
|
||||||
echo "Container status: $STATUS"
|
echo "Container status: $STATUS"
|
||||||
if [ "$STATUS" = "unhealthy" ]; then
|
if [ "$STATUS" != "running" ]; then
|
||||||
echo "::error::Container is unhealthy after deploy"
|
echo "::error::Container is not running after deploy"
|
||||||
docker logs homelab-api --tail=20
|
docker logs homelab-api --tail=20
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user