chore: add diagnostic rewrite and automated asset smoke tests
Some checks failed
Some checks failed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user