Files
Guides/.github/workflows/mkdocs_bug_prevent.yml
T
renovate[bot] a08942816b chore(deps): update actions/checkout action to v6.0.2 (#2601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 22:09:38 +00:00

38 lines
1.1 KiB
YAML

name: Check for Mkdocs Issues
on:
push:
pull_request:
jobs:
triage:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Find JSON Files Changed in Commit
id: find_json_files
run: |
# Get the list of JSON files changed in the commit
JSON_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.json$' || true)
echo "json_files=$JSON_FILES" >> $GITHUB_ENV
- name: Check JSON Files for MkDocs Macro Issues
run: |
# Check if any JSON files contain the [[ pattern
if [[ -n "$JSON_FILES" ]]; then
if grep -r '\[\[' $JSON_FILES; then
echo "::error::Found '[[', which breaks MkDocs macros in JSON files:"
grep -r -n '\[\[' $JSON_FILES
exit 1
else
echo "No '[[', patterns found in JSON files."
fi
else
echo "No JSON files changed in this commit."
fi