✨ Update design
This commit is contained in:
@@ -131,7 +131,7 @@ jobs:
|
||||
mkdir -p ~/.ssh
|
||||
|
||||
echo "==> Writing deployment SSH key"
|
||||
printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/deploy_key
|
||||
printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/authorized_keys
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
|
||||
echo "==> Scanning SSH host key"
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
|
||||
echo "==> Validating SSH private key"
|
||||
|
||||
ssh-keygen -y -f ~/.ssh/deploy_key >/dev/null \
|
||||
ssh-keygen -y -f ~/.ssh/authorized_keys >/dev/null \
|
||||
&& echo "SSH private key is valid" \
|
||||
|| {
|
||||
echo "ERROR: SSH private key cannot be parsed"
|
||||
@@ -153,21 +153,21 @@ jobs:
|
||||
|
||||
echo "==> Testing SSH connection"
|
||||
ssh \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-p "${DEPLOY_PORT:-22}" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"echo 'SSH connection successful'; echo \"Remote host: \$(hostname)\"; echo \"Remote user: \$(whoami)\""
|
||||
|
||||
echo "==> Creating deployment directory if needed..."
|
||||
ssh \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-p "${DEPLOY_PORT:-22}" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"mkdir -pv '$DEPLOY_PATH'"
|
||||
|
||||
echo "==> Verifying deployment directory..."
|
||||
ssh \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-p "${DEPLOY_PORT:-22}" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"ls -ld '$DEPLOY_PATH'"
|
||||
@@ -178,14 +178,14 @@ jobs:
|
||||
|
||||
scp \
|
||||
-v \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-P "${DEPLOY_PORT:-22}" \
|
||||
docker-compose.prod.yml \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/docker-compose.yml"
|
||||
|
||||
echo "==> Verifying uploaded compose file..."
|
||||
ssh \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-p "${DEPLOY_PORT:-22}" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"ls -lh '$DEPLOY_PATH/docker-compose.yml'"
|
||||
@@ -194,9 +194,10 @@ jobs:
|
||||
|
||||
ssh \
|
||||
-v \
|
||||
-i ~/.ssh/deploy_key \
|
||||
-i ~/.ssh/authorized_keys \
|
||||
-p "${DEPLOY_PORT:-22}" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"POSTGRES_PASSWORD=$(printf '%q' "$POSTGRES_PASSWORD") \
|
||||
BETTER_AUTH_SECRET=$(printf '%q' "$BETTER_AUTH_SECRET") \
|
||||
BETTER_AUTH_URL=$(printf '%q' "$BETTER_AUTH_URL") \
|
||||
|
||||
Reference in New Issue
Block a user