Skip to content

Commit c6e73d2

Browse files
committed
refactor: trying to fix the CI.
1 parent 9047b05 commit c6e73d2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/tests.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ jobs:
2525
- name: Check for changes in docs/ or mkdocs.yml
2626
id: check_changes
2727
run: |
28-
git fetch origin
29-
git diff --name-only origin/main -- > changed_files.txt
30-
if grep -qE '(^docs/|^mkdocs.yml)' changed_files.txt; then
31-
echo "changes_detected=true" >> $GITHUB_ENV
32-
else
28+
if [ "$(git diff --quiet origin/master -- docs/ mkdocs.yml; echo $?)" -eq 0 ];
29+
then
3330
echo "changes_detected=false" >> $GITHUB_ENV
31+
echo "No changes to docs/ and mkdocs.yml - exiting the build.";
32+
else
33+
echo "changes_detected=true" >> $GITHUB_ENV
34+
echo "Changes detected in docs/ or mkdocs.yml - continuing the build.";
3435
fi
3536
3637
- name: Set up Node.js

0 commit comments

Comments
 (0)