Skip to content

Commit a8e81fe

Browse files
committed
add more logging
1 parent 554159b commit a8e81fe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/deploy_to_hf.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,12 @@ else
549549
fi
550550

551551
SPACE_REPO="${HF_NAMESPACE}/${ENV_NAME}${SPACE_SUFFIX}"
552+
553+
# Get absolute path to staging directory
554+
if [ ! -d "$CURRENT_STAGING_DIR" ]; then
555+
echo "Error: Staging directory not found: $CURRENT_STAGING_DIR" >&2
556+
exit 1
557+
fi
552558
CURRENT_STAGING_DIR_ABS=$(cd "$CURRENT_STAGING_DIR" && pwd)
553559

554560
# Determine privacy flag (only add --private if needed, default is public)
@@ -573,6 +579,12 @@ if [ $UPLOAD_EXIT_CODE -ne 0 ]; then
573579
echo "❌ Upload failed with exit code $UPLOAD_EXIT_CODE" >&2
574580
echo "Error output:" >&2
575581
echo "$SPACE_UPLOAD_RESULT" >&2
582+
echo "" >&2
583+
echo "Debug info:" >&2
584+
echo " Space: $SPACE_REPO" >&2
585+
echo " Staging dir: $CURRENT_STAGING_DIR_ABS" >&2
586+
echo " Files to upload:" >&2
587+
ls -la "$CURRENT_STAGING_DIR_ABS" >&2 || true
576588
exit 1
577589
fi
578590
# print the URL of the deployed space

0 commit comments

Comments
 (0)