Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work in progress #3657

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/lychee_url_checker.yml
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 @@ -7,30 +7,29 @@ on:
- develop
pull_request:
schedule:
# Run everyday at 3 am UTC
# Run every day at 3 am UTC
- cron: "0 3 * * *"

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

# cache Lychee results to avoid hitting rate limits
# Cache Lychee results to avoid hitting rate limits
- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

# check URLs with Lychee
# Check URLs with Lychee
- uses: actions/checkout@v4

# use stable version for now to avoid breaking changes
- name: Lychee URL checker
uses: lycheeverse/[email protected]
with:
# arguments with file types to check
# Arguments with file types to check
args: >-
--cache
--no-progress
Expand All @@ -53,10 +52,20 @@ jobs:
'./**/*.ipynb'
'./**/*.json'
'./**/*.toml'
# fail the action on broken links
# Fail the action on broken links
fail: true
jobSummary: true
format: markdown
env:
# to be used in case rate limits are surpassed
# To be used in case rate limits are surpassed
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# Check Sphinx-related links using Sphinx linkcheck builder
- name: Install Sphinx
run: |
pip install -r docs/requirements.txt
- name: Run Sphinx linkcheck
run: |
sphinx-build -b linkcheck docs docs/build/linkcheck

# Optionally, you can add more steps to handle Sphinx linkcheck results
Loading