Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/test-lp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,34 @@ jobs:
**.md
- name: Check for capital letters or spaces in content directory
run: |
echo "Checking for capital letters or spaces in content directory paths..."
echo "Checking for capital letters or spaces in content directory paths (excluding file extensions)..."

tmpfile=$(mktemp)

git diff --name-only origin/${{ github.base_ref }}...HEAD |
grep '^content/' |
grep -E '[A-Z]|[[:space:]]' && {
echo "❌ Found invalid file or directory names with capital letters or spaces in 'content/'"
exit 1
}
while read -r path; do
name=$(basename "$path")

# Strip file extension if it exists
base="${name%.*}"

if [[ "$base" =~ [A-Z] || "$base" =~ [[:space:]] ]]; then
echo "Invalid name: $path"
echo "$path" >> "$tmpfile"
fi
done

if [[ -s "$tmpfile" ]]; then
echo "❌ One or more files or directories in 'content/' contain capital letters or spaces (excluding extensions):"
cat "$tmpfile"
rm "$tmpfile"
exit 1
else
rm "$tmpfile"
echo "✅ No capital letters or spaces found in 'content/' paths."
fi

echo "✅ No capital letters or spaces found in 'content/' paths."
- name: Install dependencies
if: steps.changed-markdown-files.outputs.any_changed == 'true'
run: pip install -r tools/requirements.txt
Expand Down