Skip to content

Commit

Permalink
Added a link checker step in the doctests jobs using both Lychee and …
Browse files Browse the repository at this point in the history
…Sphinx parallelly
  • Loading branch information
RohitP2005 committed Dec 17, 2024
1 parent ae014e2 commit ff8f148
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check URLs with Lychee
name: Check URLs with Lychee and Sphinx

on:
push:
Expand All @@ -11,7 +11,7 @@ on:
- cron: "0 3 * * *"

jobs:
linkChecker:
linkCheckerLychee:
runs-on: ubuntu-latest
steps:

Expand Down Expand Up @@ -61,3 +61,17 @@ jobs:
env:
# to be used in case rate limits are surpassed
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
linkcheckerSphinx:
runs-on: ubuntu-latest
needs: linkCheckerLychee

steps:
# Checkout repository code
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Run Sphinx's linkcheck builder
- name: Run Sphinx linkcheck
run: |
sphinx-build -b linkcheck . _build/linkcheck || exit 1 #Fail the job if the link is broken
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ff8f148

Please sign in to comment.