Skip to content

Commit 81cb061

Browse files
committed
chore: run checker only if files changed
1 parent f09ef20 commit 81cb061

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/link-checker.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,23 @@ jobs:
2020
- docs/**
2121
2222
- name: Run step if doc file(s) change
23-
# if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
23+
if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
2424
env:
2525
DOC_ALL_CHANGED_FILES: ${{ steps.changed-files-yaml.outputs.doc_all_changed_files }}
2626
run: |
2727
echo "One or more doc file(s) has changed."
2828
echo "List all the files that have changed: $DOC_ALL_CHANGED_FILES"
2929
30+
# If one file is changed, we can check all the files
3031
- name: Check markdown links in docs
31-
# if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
32+
if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
3233
uses: gaurav-nelson/github-action-markdown-link-check@v1
3334
with:
3435
config-file: '.github/workflows/link-checker.config.json'
3536
folder-path: 'docs/'
3637

3738
- name: Check markdown files in root
38-
# if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
39+
if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
3940
uses: gaurav-nelson/github-action-markdown-link-check@v1
4041
with:
4142
config-file: '.github/workflows/link-checker.config.json'

0 commit comments

Comments
 (0)