Improve sitemap, RSS, and SEO guardrails
TaxBaik CI/CD / build-and-deploy (push) Successful in 59s

This commit is contained in:
2026-07-11 13:09:57 +09:00
parent e0945f46a6
commit bcc3d6e680
12 changed files with 215 additions and 104 deletions
+19
View File
@@ -27,6 +27,9 @@ jobs:
set -e
python3 scripts/validate_locked_db_connection.py
- name: Validate SEO search guardrails
run: python3 scripts/validate_seo.py
- name: Build solution
run: dotnet build src/TaxBaik.sln -c Release --no-restore -p:ContinuousIntegrationBuild=true
@@ -339,6 +342,22 @@ jobs:
fi
echo "✓ [6/6] 관리자 페이지 로드 완료"
# 검색 엔진은 Content-Type뿐 아니라 유효한 XML 본문을 요구한다.
# 공통 Razor 레이아웃이 다시 섞이는 회귀를 배포 직후 차단한다.
SITEMAP_BODY=\$(curl -fsS http://127.0.0.1:5001/sitemap.xml 2>/dev/null || true)
RSS_BODY=\$(curl -fsS http://127.0.0.1:5001/rss.xml 2>/dev/null || true)
if ! printf '%s' "\$SITEMAP_BODY" | grep -q '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' \
|| printf '%s' "\$SITEMAP_BODY" | grep -q '<!DOCTYPE html>'; then
echo "❌ sitemap.xml XML 응답 검증 실패" >&2
exit 1
fi
if ! printf '%s' "\$RSS_BODY" | grep -q '<rss version="2.0"' \
|| printf '%s' "\$RSS_BODY" | grep -q '<!DOCTYPE html>'; then
echo "❌ rss.xml XML 응답 검증 실패" >&2
exit 1
fi
echo "✓ [7/7] 사이트맵 및 RSS XML 응답 검증 완료"
echo "✓ 서비스 정상 (시도 \$i/\$ATTEMPTS)"
# 구 배포 디렉토리 정리 (최근 5개 보존)
ls -1dt \$DEPLOY_HOME/deployments/taxbaik_* 2>/dev/null \