mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-08-30 17:50:13 +02:00
Improve site directory validation by checking for at least one file.
This commit is contained in:
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user