Skip to content

Commit

Permalink
flow update for only broken link removed unwanted comments and format…
Browse files Browse the repository at this point in the history
…ted structure
  • Loading branch information
Khushalsarode committed Oct 20, 2024
1 parent f4ec7b7 commit 31d23ae
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/docs_link_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -r docs/requirements.txt #installing the required packages from repo docs/requirements.txt
echo "Dependencies installed."
# Run Sphinx linkcheck to check for broken URLs
- name: Run Sphinx linkcheck
run: |
cd docs
sphinx-build -b linkcheck source _build/linkcheck || true # link from source docs to be checked
grep "broken" _build/linkcheck/output.txt > broken_links.txt
grep "broken" _build/linkcheck/output.txt > broken_links.txt #output of broken links to broken_links.txt from _builds/linkcheck/output.txt
if [ -s broken_links.txt ]; then
echo "Broken links found:"
cat broken_links.txt
else
echo "No broken links found."
fi
# Display linkcheck results and fail on broken links
#- name: Display linkcheck results
# run: |
# cat _build/linkcheck/output.txt
# Check if the output contains "broken" & list the broken links
# if grep -q "broken" _build/linkcheck/output.txt; then
# echo "Broken links detected!"
# exit 1 # Fail the job if broken links are found
# else
# echo "No broken links found."
# fi

0 comments on commit 31d23ae

Please sign in to comment.