chore: add diagnostic rewrite and automated asset smoke tests
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🏗️ Build (push) Successful in 9m38s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🩺 Smoke Test (push) Failing after 4s
Build & Deploy / 🔔 Notify (push) Successful in 3s

This commit is contained in:
2026-04-12 18:49:11 +02:00
parent d5d0d77180
commit c505050cb4
2 changed files with 37 additions and 5 deletions

View File

@@ -480,17 +480,44 @@ jobs:
exit 1
fi
- name: 🌐 Check Case Study Assets
- name: 🌐 Check Case Study Assets and Rewrites
shell: sh
run: |
URL="${{ needs.prepare.outputs.next_public_url }}/case-studies/klz-cables"
echo "Verifying case study $URL..."
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
BASE_URL="${{ needs.prepare.outputs.next_public_url }}"
echo "Verifying diagnostic rewrite..."
STATUS=$(curl -s -L -o /dev/null -w "%{http_code}" "$BASE_URL/robots-test")
if [ "$STATUS" != "200" ]; then
echo "❌ Diagnostic rewrite /robots-test failed! (Status: $STATUS)"
exit 1
fi
echo "✅ Diagnostic rewrite OK"
echo "Verifying case study page..."
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/case-studies/klz-cables")
if [ "$STATUS" != "200" ]; then
echo "❌ Case study page failed! (Status: $STATUS)"
exit 1
fi
echo "✅ Case study page is UP"
echo "✅ Case study page UP"
echo "Verifying breeze CSS (root path)..."
CSS_PATH="/assets/klz-cables.com/wp-content/cache/breeze-minification/css/breeze_klz-cables-com-1-10895.css"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL$CSS_PATH")
if [ "$STATUS" != "200" ]; then
echo "❌ Root asset path failed! (Status: $STATUS)"
exit 1
fi
echo "✅ Root asset path OK"
echo "Verifying breeze CSS (relative path from case-study)..."
REL_CSS_PATH="/case-studies/assets/klz-cables.com/wp-content/cache/breeze-minification/css/breeze_klz-cables-com-1-10895.css"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL$REL_CSS_PATH")
if [ "$STATUS" != "200" ]; then
echo "❌ Relative asset path failed! (Status: $STATUS)"
exit 1
fi
echo "✅ Relative asset path OK"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 6: Notifications

View File

@@ -66,6 +66,11 @@ const nextConfig = {
source: '/:folder(case-studies|work|blog)/wp-includes/:path*',
destination: '/showcase/klz-cables.com/assets/klz-cables.com/wp-includes/:path*',
},
// Diagnostic rule
{
source: '/robots-test',
destination: '/robots.txt',
},
],
};
},