mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-09-01 02:22:00 +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
|
git checkout --orphan site-artifact
|
||||||
# Remove everything except .git
|
# Remove everything except .git
|
||||||
find . -mindepth 1 ! -regex '^./.git\(/.*\)?' -delete
|
find . -mindepth 1 ! -regex '^./.git\(/.*\)?' -delete
|
||||||
# Check if site/ exists and is not empty
|
# Check if site/ exists and contains at least one file
|
||||||
if [ ! -d site ] || [ -z "$(ls -A site)" ]; then
|
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."
|
echo "site/ directory does not exist or is empty. MkDocs build may have failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user