wip
CI / build (push) Successful in 2m40s
CI / deploy (push) Failing after 7s

This commit is contained in:
2026-08-27 22:54:21 +02:00
parent a76678293f
commit 2fb3038850
+2 -11
View File
@@ -84,25 +84,17 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
echo "Testing DNS..."
getent hosts "$DEPLOY_HOST"
echo "Testing SSH port..."
timeout 10 bash -c "</dev/tcp/$DEPLOY_HOST/${DEPLOY_PORT:-22}"
echo "Preparing SSH..."
mkdir -p ~/.ssh mkdir -p ~/.ssh
printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/deploy_key printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key
echo "Getting host key..."
ssh-keyscan -p "${DEPLOY_PORT:-22}" -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts ssh-keyscan -p "${DEPLOY_PORT:-22}" -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
echo "Testing SSH authentication..." echo "Creating deployment directory if needed..."
ssh -i ~/.ssh/deploy_key \ ssh -i ~/.ssh/deploy_key \
-p "${DEPLOY_PORT:-22}" \ -p "${DEPLOY_PORT:-22}" \
"$DEPLOY_USER@$DEPLOY_HOST" \ "$DEPLOY_USER@$DEPLOY_HOST" \
"echo 'SSH connection successful'" "mkdir -p '$DEPLOY_PATH'"
echo "Uploading compose file..." echo "Uploading compose file..."
scp -i ~/.ssh/deploy_key \ scp -i ~/.ssh/deploy_key \
@@ -119,5 +111,4 @@ jobs:
IMAGE_TAG='$IMAGE_TAG' docker compose up -d && \ IMAGE_TAG='$IMAGE_TAG' docker compose up -d && \
docker image prune -f" docker image prune -f"
echo "Deployment successful!"