From 4b9bbb5d194de50375a53a487610f0b2dc926962 Mon Sep 17 00:00:00 2001 From: Colton Baumler <63077899+ccbaumler@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:22:24 -0800 Subject: [PATCH] Update update_index.yaml with target file --- .github/workflows/update_index.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_index.yaml b/.github/workflows/update_index.yaml index e831625..729f615 100644 --- a/.github/workflows/update_index.yaml +++ b/.github/workflows/update_index.yaml @@ -28,8 +28,8 @@ jobs: # Diff HEAD with the previous commit $diff = git diff --name-only HEAD^ HEAD - # Check if a file under docs/ or with the .md extension has changed (added, modified, deleted) - $SourceDiff = $diff | Where-Object { $_ -match '^docs/' } + # Check if a markdown file and only a markdown file in the first recursive layer of the docs/ directory has been added or deleted + $SourceDiff = $diff | Where-Object { $_ -match '^docs/' -and $_ -like '*.md' -and $_ -notlike '*/*' } $HasDiff = $SourceDiff.Length -gt 0 # Set the output named "docs_changed"