deploy
All checks were successful
Build & Deploy / deploy (push) Successful in 3m20s

This commit is contained in:
2026-01-21 11:52:41 +01:00
parent ded9150df6
commit 846319b2c7

View File

@@ -59,7 +59,6 @@ jobs:
# --- Sync files ---
- name: Sync files to server
run: |
# Use IPQoS=0x00 to prevent connection drops in some network environments
# Use tar to bundle files and send them via SSH in a single connection
tar czf - docker-compose.yml $([ -d ./varnish ] && echo varnish) | \
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 deploy@alpha.mintel.me \
@@ -73,19 +72,25 @@ jobs:
run: |
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no -o IPQoS=0x00 deploy@alpha.mintel.me "
set -e
echo 'Logging in to registry on server...'
echo '$REGISTRY_PASS' | docker login registry.infra.mintel.me -u '$REGISTRY_USER' --password-stdin
cd /home/deploy/sites/klz-cables.com
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" > .env
echo 'Pulling latest images...'
docker compose pull
echo 'Updating containers...'
docker compose up -d
echo 'Pruning old images...'
docker image prune -f
"
echo 'Creating .env if needed...'
echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > .env
echo 'Pulling latest image...'
docker compose pull app || echo 'Pull failed - continuing anyway...'
echo 'Force recreating and restarting app container...'
docker compose up -d --force-recreate --no-deps app
echo 'Pruning old images (keep last 24h)...'
docker image prune -f --filter 'until=24h'
echo 'Deployment finished. Checking status...'
docker compose ps app
docker compose logs --tail=20 app
"