Skip to content

deploy prometheus and grafana on k8s #56

deploy prometheus and grafana on k8s

deploy prometheus and grafana on k8s #56

name: Check Legacy Docs Frozen
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-legacy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changes in legacy docs directories
run: |
set -e
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
# All changes in this PR (added / modified / deleted / renamed)
CHANGED=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
LEGACY=$(echo "$CHANGED" | grep -E '^(docs/|i18n/zh-CN/docusaurus-plugin-content-docs/current/)' || true)
NEXT=$(echo "$CHANGED" | grep -E '^(docs-next/|i18n/zh-CN/docusaurus-plugin-content-docs-next/current/)' || true)
if [ -n "$LEGACY" ] && [ -z "$NEXT" ]; then
echo "::error::Legacy docs changed without corresponding next-version docs changes."
echo ""
echo "❌ The following legacy doc files were changed in this PR:"
echo "$LEGACY" | sed 's/^/ - /'
echo ""
echo "But no changes were detected in the next-version directories:"
echo " - docs-next/"
echo " - i18n/zh-CN/docusaurus-plugin-content-docs-next/current/"
echo ""
echo "If you modify legacy docs, you MUST also apply the equivalent changes"
echo "to the corresponding next-version directory:"
echo " English: docs/<path>"
echo " -> docs-next/<path>"
echo " 中文: i18n/zh-CN/docusaurus-plugin-content-docs/current/<path>"
echo " -> i18n/zh-CN/docusaurus-plugin-content-docs-next/current/<path>"
echo ""
echo "Note: a few top-level folders were renamed in the new structure, e.g."
echo " gettingStarted -> getting-started"
echo " ecosystem -> connection-integration (structure also changed; please review)"
exit 1
fi
if [ -n "$LEGACY" ]; then
echo "✅ Legacy docs changed, and next-version docs were also updated."
else
echo "✅ No changes in legacy docs directories."
fi