Skip to content

Commit

Permalink
Merge pull request #11212 from VannTen/cleanup/check_sidebar_ci
Browse files Browse the repository at this point in the history
Check that PRs have correctly ran the sidebar gen
  • Loading branch information
k8s-ci-robot authored May 20, 2024
2 parents 53ad8d9 + 96bb0a3 commit 998e04e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitlab-ci/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions scripts/gen_docs_sidebar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,3 +31,4 @@ for folder in $(find docs/*/ | sort -f); do
done
fi
done
} > docs/_sidebar.md

0 comments on commit 998e04e

Please sign in to comment.