From d2d31dd803965e0cb84e1760b75452a10de2be6b Mon Sep 17 00:00:00 2001 From: Marcelo Prates Date: Fri, 16 May 2025 22:13:37 -0300 Subject: [PATCH] Improve site directory validation by checking for at least one file. --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07975cd..c4276ef 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,8 +42,8 @@ jobs: git checkout --orphan site-artifact # Remove everything except .git find . -mindepth 1 ! -regex '^./.git\(/.*\)?' -delete - # Check if site/ exists and is not empty - if [ ! -d site ] || [ -z "$(ls -A site)" ]; then + # Check if site/ exists and contains at least one file + if [ ! -d site ] || [ "$(find site -type f | wc -l)" -eq 0 ]; then echo "site/ directory does not exist or is empty. MkDocs build may have failed." exit 1 fi