From aed7772bd3679c15410c7e33c924900d7fe0fa1c Mon Sep 17 00:00:00 2001 From: Hossain Khan Date: Thu, 12 Sep 2024 19:34:48 -0400 Subject: [PATCH] debug more --- .github/workflows/approve-docs.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/approve-docs.yml b/.github/workflows/approve-docs.yml index f90838c..7cba222 100644 --- a/.github/workflows/approve-docs.yml +++ b/.github/workflows/approve-docs.yml @@ -24,8 +24,20 @@ jobs: # Check if any changes were made outside the 'apilib/docs/**/*.md' path UNWANTED_FILES=$(echo "$CHANGED_FILES" | grep -Ev '^apilib/docs/.*\.md$') + + # Check the size and content of UNWANTED_FILES + echo "• Size of UNWANTED_FILES:" + echo "$UNWANTED_FILES" | wc + echo "• Content of UNWANTED_FILES:" + echo "$UNWANTED_FILES" - if [ -n "$UNWANTED_FILES" ]; then + # Store the result of the check in a variable + UNWANTED_FILES_CHECK=$( [ -n "$UNWANTED_FILES" ] && echo "true" || echo "false" ) + + # Debug the variable + echo "• UNWANTED_FILES_CHECK: $UNWANTED_FILES_CHECK" + + if [ "$UNWANTED_FILES_CHECK" = "true" ]; then echo "• Changes detected outside doc site files" echo "$UNWANTED_FILES" echo "• Stopping workflow - this PR can not be auto-approved."