Update .gitea/workflows/test-skins.yml
All checks were successful
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Successful in 25s
Test Skins / link-check (push) Successful in 1m6s

This commit is contained in:
2025-11-23 13:07:20 +01:00
parent 73400867f8
commit add029a30f

View File

@@ -28,14 +28,18 @@ jobs:
check_http() {
local url="$1"
echo " → Checking external: $url"
# HEAD first
if curl -Is --max-time 10 "$url" | head -n 1 | grep -qE "HTTP/.* (200|30[0-9])"; then
return 0
fi
# GET fallback
if curl -Is --max-time 10 -X GET "$url" | head -n 1 | grep -qE "HTTP/.* (200|30[0-9])"; then
return 0
fi
return 1
}
@@ -45,6 +49,8 @@ jobs:
local decoded
decoded=$(urldecode "$path")
echo " → Checking local: $decoded"
if [[ ! -e "$decoded" ]]; then
return 1
fi
@@ -99,12 +105,16 @@ jobs:
echo
done < <(find . -type f -name '*.md')
echo
if (( ${#ERRORS[@]} > 0 )); then
echo -e "${RED}✖ Errors found:${RESET}"
echo -e "${RED}✖ Broken Links & Missing Files Found:${RESET}"
for e in "${ERRORS[@]}"; do
echo "$e"
done
exit 1
echo
echo -e "${RED}⚠️ Job will NOT fail (requested behavior).${RESET}"
else
echo -e "${GREEN}✔ All links OK!${RESET}"
fi
echo -e "${GREEN}✔ All links OK!${RESET}"
exit 0