Merge pull request #11212 from VannTen/cleanup/check_sidebar_ci

Check that PRs have correctly ran the sidebar gen
pull/11222/head
Kubernetes Prow Robot 2024-05-20 08:04:33 -07:00 committed by GitHub
commit 998e04e5a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -89,6 +89,14 @@ markdownlint:
script:
- markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
generate-sidebar:
extends: .job
stage: unit-tests
tags: [light]
script:
- scripts/gen_docs_sidebar.sh
- git diff --exit-code
check-readme-versions:
stage: unit-tests
tags: [light]

View File

@ -8,6 +8,8 @@
# The script will ignore any files that are not markdown files.
# Usage: bash scripts/gen_docs_sidebar.sh > docs/_sidebar.md
export LANG=C
{
echo "* [Readme](/)"
for folder in $(find docs/*/ | sort -f); do
@ -29,3 +31,4 @@ for folder in $(find docs/*/ | sort -f); do
done
fi
done
} > docs/_sidebar.md