Skip to content

Commit

Permalink
flow to show only broken and not found, easy to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
Khushalsarode committed Oct 27, 2024
1 parent a20e33a commit 8a4743f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/docs_link_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,30 @@ jobs:
# -s flag checks if the file is not empty
# Display broken links if found
if [ -s broken_links.txt ]; then
echo "==============================="
echo "Broken links found:"
echo "==============================="
cat broken_links.txt
fi
# Display 'Not Found for url' links if found
if [ -s not_found_links.txt ]; then
echo "==============================="
echo "Not Found for url:"
echo "==============================="
cat not_found_links.txt
fi
# Exit with error if any broken or not found links exist
if [ -s broken_links.txt ] || [ -s not_found_links.txt ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Broken links found."
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
else
echo "#########################"
echo "No broken links found."
echo "#########################"
fi

0 comments on commit 8a4743f

Please sign in to comment.