Skip to content

Lycheetest #91

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/.linkspector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dirs:
- .
useGitIgnore: true
34 changes: 34 additions & 0 deletions .github/workflows/.lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# URL patterns to exclude from checking, one regex pattern per line
# These links will be ignored by lychee

# Example domains
^https?://example\.com
^https?://example\.org

# Common temporary URLs or local development URLs
^https?://localhost
^https?://127\.0\.0\.1
^https?://0\.0\.0\.0

# Social media links (often have anti-scraping measures that may cause checks to fail)
^https?://(www\.)?linkedin\.com
^https?://(www\.)?twitter\.com
^https?://(www\.)?facebook\.com

# Files that may have restricted access
\.pdf$

# Local file paths that exist in production but not in CI environment
file:///home/runner/work/eclipse-edc.github.io/eclipse-edc.github.io/content/en/images/edc.schematic.svg
# Exclude all local SVG files as they may be processed during build
file://.*\.svg$
# Exclude content directory files which may be generated during build
file://.*?/content/.*

# GitHub specific patterns to reduce API rate limiting
# These patterns are specifically for repositories that frequently cause 429 errors
^https?://github\.com/git/git/blob/
^https?://raw\.githubusercontent\.com/git/
^https?://api\.github\.com/

# Add project-specific URL patterns to exclude here
68 changes: 68 additions & 0 deletions .github/workflows/check-broken-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Check Broken Links

on:
pull_request:
types: [opened, synchronize, reopened]
# Optional: Add scheduled checks
# schedule:
# - cron: "0 0 * * 0" # Runs once every Sunday

jobs:
check-links:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Set up caching to reduce API requests
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Setup link exclusion patterns (optional)
id: setup-exclude
run: |
if [ -f .lycheeignore ]; then
echo "Exclusion patterns found in .lycheeignore"
else
echo "# Add URL regex patterns to exclude, one per line" > .lycheeignore
echo "# Example: ^https://example.com" >> .lycheeignore
fi

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
args: >-
--cache
--max-cache-age 48h
--verbose
--no-progress
--exclude-path ".git"
--exclude-path "node_modules"
--max-retries 5
--timeout 30
--max-concurrency 8
--retry-wait-time 3
'./**/*.md'
'./**/*.html'
'./**/*.txt'
fail: true
format: markdown
output: ./lychee-report.md

# If you want to post check results as PR comments, uncomment the following step
# - name: Create Comment
# uses: peter-evans/create-or-update-comment@v3
# if: github.event_name == 'pull_request' && steps.lychee.outputs.exit_code != 0
# with:
# issue-number: ${{ github.event.pull_request.number }}
# body-file: ./lychee-report.md
16 changes: 16 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Links # use https://github.com/marketplace/actions/run-linkspector-with-reviewdog
on: [ workflow_dispatch, pull_request ]
jobs:
check-links:
name: runner / linkspector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
filter_mode: nofilter
fail_level: any
config_file: .linkspector.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eclipse-edc.github.io website

This repository contains project-wide documentation.
This repository contains project-wide documentation without any broken links.

## Running the website locally

Expand Down
Loading