-
Notifications
You must be signed in to change notification settings - Fork 170
[FIX] Lychee failing action #352
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
Open
dansysanalyst
wants to merge
5
commits into
pestphp:4.x
Choose a base branch
from
dansysanalyst:fix_link_checker
base: 4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+14
−135
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
07fd2ee
Update lychee.toml
dansysanalyst f470d1d
remove unnecessary config file
dansysanalyst 067678c
switch to inline arguments
dansysanalyst aa7a31c
fix broken link
dansysanalyst 70900be
ignore gnu.org due to frequent timeouts
dansysanalyst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,27 @@ | ||
| # This action checks for broken links | ||
| name: Check Links | ||
| name: Check for broken links | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "00 00 * * *" | ||
| # Runs weekly on Monday at 00:00 | ||
| - cron: "0 0 * * 1" | ||
|
|
||
| jobs: | ||
| linkChecker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Restore lychee cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: .lycheecache | ||
| key: cache-lychee-${{ github.sha }} | ||
| restore-keys: cache-lychee- | ||
|
|
||
| - name: 🔗 Check Links | ||
| uses: lycheeverse/lychee-action@v2 | ||
| with: | ||
| jobSummary: true | ||
| args: --base-url "$(pwd)" --cache --max-cache-age 1d --config .github/workflows/lychee.toml './**/*.md' | ||
| lycheeVersion: latest | ||
| format: markdown | ||
| args: > | ||
| --base https://pestphp.com | ||
| --user-agent "Mozilla 5.0" | ||
| --exclude "https?://(www\.)?(twitter\.com|instagram\.com|linkedin\.com|gnu\.org)" | ||
| --max-retries 5 | ||
| --verbose | ||
| --no-progress | ||
| "**/*.md" | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to check, this doesn't actually scan broken links on the live site, it checks the local docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I understood the question, but the
baseargument is used to resolve the local files as links.[only()](/docs/filtering-tests#only)➔ https://pestphp.com/docs/filtering-tests#onlyIf we have a broken link on the home page, it will not be detected, as this action only checks the .md doc files.
If you see fit, we could probably set up
ScholliYT/Broken-Links-Crawler-Actionscanning the live website (likely in the pestphp/pestphp.com repo). But it has always seemed to me that the website does not change so often that we risk having broken links outside the docs.My original motivation with this action some years ago was to avoid broken links to external resources (e.g., Laravel and PHPUnit docs) when features are renamed/moved. If I remember well, there were a couple of cases in 2x doc revision.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that's all good then! 👍🏻 I just wanted to make sure it was checking local files, and not the actual remote.
This LGTM. However, I'm no longer a Pest team member, so my approval won't lead to a merge.