Skip to content

Commit a5a1ae1

Browse files
committed
debug: capture supertokens container logs on deploy failure
1 parent bdf5065 commit a5a1ae1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy-staging.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,10 @@ jobs:
8585
"umask 077 && mkdir -p ~/compass && cat > ~/compass/compass.yaml"
8686
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "curl -fsSL https://raw.githubusercontent.com/SwitchbackTech/compass/${RELEASE_TAG}/self-host/compose.yaml -o ~/compass/compose.yaml"
8787
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "curl -fsSL https://raw.githubusercontent.com/SwitchbackTech/compass/${RELEASE_TAG}/self-host/compass -o ~/compass/compass && chmod +x ~/compass/compass"
88-
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "cd ~/compass && ./compass update"
88+
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "cd ~/compass && ./compass update" || {
89+
echo "--- supertokens logs ---"
90+
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "docker logs compass-supertokens-1 2>&1 | tail -40" || true
91+
echo "--- supertokens-db logs ---"
92+
ssh -i ~/.ssh/staging_key "$SSH_USER@$SSH_HOST" "docker logs compass-supertokens-db-1 2>&1 | tail -20" || true
93+
exit 1
94+
}

0 commit comments

Comments
 (0)