-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1497dc2
commit c548848
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -43,7 +43,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: AlexanderDokuchaev/md-dead-link-check@v0.6 | ||
- uses: AlexanderDokuchaev/md-dead-link-check@v0.7 | ||
``` | ||
### Option 2: Pre-Commit | ||
|
@@ -57,6 +57,44 @@ Adding to your `.pre-commit-config.yaml` to integrate in [pre-commit](https://pr | |
- id: md-dead-link-check | ||
``` | ||
|
||
> [!NOTE] | ||
> For the `pull_request` event type, the action will only check external links for files that have been modified. | ||
> To scan all links, consider using a separate action that runs periodically on target branches. | ||
> This approach helps prevent pull request merges from being blocked by broken links unrelated to the files | ||
> modified in the pull request. | ||
|
||
```yaml | ||
# .github/workflows/nightly.yaml | ||
name: nightly | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
md-dead-link-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: AlexanderDokuchaev/[email protected] | ||
``` | ||
|
||
```yaml | ||
# .github/workflows/pull_request.yaml | ||
name: pull_request | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
jobs: | ||
md-dead-link-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: AlexanderDokuchaev/[email protected] | ||
``` | ||
|
||
### Option 3: Install from pip | ||
|
||
For direct use, install with pip and run: | ||
|
This file contains 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