From 53fc7170bd0eeb1fc6509ebfe1d4f39146b78f41 Mon Sep 17 00:00:00 2001 From: Gregor Hartmann Date: Fri, 8 Jan 2021 23:39:47 +0100 Subject: [PATCH] Add CI check to verify MkDocs menu items (#3367) --- .github/workflows/build.yml | 16 ++++++++++++++++ tools/check_docs_module_linkage.sh | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100755 tools/check_docs_module_linkage.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73f389a9..90173656 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -240,3 +240,19 @@ jobs: ./tools/travis/run-luacheck-${{ matrix.os }}.sh shell: bash + + + doc_check: + + strategy: + fail-fast: false + runs-on: ubuntu-16.04 + + steps: + - uses: actions/checkout@v2 + with: + submodules: false + - name: all_modules_linked + run: ./tools/check_docs_module_linkage.sh + shell: bash + diff --git a/tools/check_docs_module_linkage.sh b/tools/check_docs_module_linkage.sh new file mode 100755 index 00000000..7f586160 --- /dev/null +++ b/tools/check_docs_module_linkage.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# get all linked module docs for mkdocs.yml +grep "modules/" mkdocs.yml | sed "s/ *- .*: *'//" | sed "s/'//" | sort > /tmp/doc + +# get all module and lua_module *.md files +find docs/modules/ docs/lua-modules/ -name "*.md" | sed "sxdocs/xx" | sort > /tmp/files + +diff /tmp/doc /tmp/files && echo "all *.md files are reflected in mkdocs.yml" +