2626 - name : Validate driver documentation structure
2727 run : |
2828 # Check for one .md and one .yaml file per driver
29- find src/content/docs/drivers -mindepth 2 -maxdepth 2 -type d | while read -r category_dir; do
29+ find src/content/docs -mindepth 2 -maxdepth 2 -type d | while read -r category_dir; do
3030 category_name=$(basename "$category_dir")
3131 find "$category_dir" -mindepth 1 -maxdepth 1 -type d | while read -r driver_dir; do
3232 driver_name=$(basename "$driver_dir")
4747 - name : Validate image formats
4848 run : |
4949 # Check driver thumbnails
50- find public/images/drivers -type f ! -name "*.webp" -print0 | while IFS= read -r -d $'\0' file; do
50+ find src/content/docs -type f ! -name "*.webp" -print0 | while IFS= read -r -d $'\0' file; do
5151 echo "::error file=$file::Driver thumbnail '$file' must be in .webp format."
5252 exit 1
5353 done
6464
6565 - name : Validate images exist
6666 run : |
67- find src/content/docs/drivers -name "*.yaml" | while read -r yaml_file; do
67+ find src/content/docs -name "*.yaml" | while read -r yaml_file; do
6868 manufacturer=$(grep "Manufacturer:" "$yaml_file" | awk -F': ' '{print $2}' | tr -d '\r')
6969
7070 if [ -n "$manufacturer" ]; then
8080 fi
8181 done
8282
83- find src/content/docs/drivers -name "*.md" | while read -r md_file; do
83+ find src/content/docs -name "*.md" | while read -r md_file; do
8484 category=$(grep "category:" "$md_file" | awk -F': ' '{print $2}' | tr -d '\r')
8585 if [ -n "$category" ]; then
8686 category_slug=$(echo "$category" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9-]/-/g' | sed 's/--/-/g' | sed 's/^-//' | sed 's/-$//')
@@ -106,4 +106,4 @@ jobs:
106106 echo "::error file=$md_file::Thumbnail image not found in '$md_file'."
107107 exit 1
108108 fi
109- done
109+ done
0 commit comments