File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 114114# Early exit start: skip pipeline if conditions are met
115115# ----------------------------------------------------------------------
116116
117- # skip pipeline if all changed files are under docs/
117+ # skip pipeline if *every* changed file is docs/** OR **/*.md OR mkdocs.yaml
118118if [[ " ${DOCS_ONLY_DISABLE} " != " 1" ]]; then
119119 if [[ -n " ${file_diff:- } " ]]; then
120120 docs_only=1
121- # Robust iteration over newline-separated file_diff
121+ # Iterate robustly over newline-separated paths
122122 while IFS= read -r f; do
123123 [[ -z " $f " ]] && continue
124- # **Policy:** only skip if *every* path starts with docs/
125- if [[ " $f " != docs/* ]]; then
124+ # Match any of: docs/** OR **/*.md OR mkdocs.yaml
125+ # Using prefix check for docs/ so nested paths match (no need for globstar).
126+ if [[ " ${f# docs/ } " != " $f " || " $f " == * .md || " $f " == " mkdocs.yaml" ]]; then
127+ continue
128+ else
126129 docs_only=0
127130 break
128131 fi
129132 done < <( printf ' %s\n' " $file_diff " | tr ' ' ' \n' | tr -d ' \r' )
130133
131134 if [[ " $docs_only " -eq 1 ]]; then
132- buildkite-agent annotate " :memo: CI skipped — docs/** only changes detected
135+ buildkite-agent annotate " :memo: CI skipped — docs/Markdown/mkdocs- only changes detected
133136
134137\`\`\`
135- ${ file_diff}
138+ $( printf ' %s\n ' " $ file_diff" | tr ' ' ' \n ' )
136139\`\`\` " --style " info" || true
137- echo " [docs-only] All changes are under docs/. Exiting before pipeline upload."
140+ echo " [docs-only] All changes are docs/**, *.md, or mkdocs.yaml . Exiting before pipeline upload."
138141 exit 0
139142 fi
140143 fi
You can’t perform that action at this time.
0 commit comments