Overview • Features • Configuration • Usage Examples • Contributing • License
The Markdown Links Action automates the process of validating links in Markdown files within a GitHub repository, ensuring all hyperlinks in your documentation are functional and up-to-date.
Flexible Configuration: Configure various aspects of the action according to your project's needs.
Configure the action using these inputs:
Input | Description | Required | Default Value |
---|---|---|---|
folder-path |
Custom folder path for Markdown files. | Yes | . |
max-depth |
Maximum depth for directory checks. | Yes | -1 |
check-modified-files-only |
Check only modified files if set to yes . |
Yes | no |
base-branch |
Base branch for comparing changes in PRs. | Yes | main |
file-extension |
File extension of Markdown files to check. | Yes | .md |
file-path |
Additional specific files to check. | Yes | |
create-issue |
Create issue for broken links if set to yes . |
Yes | no |
gh-assignees |
Assignees for the created issues. | No | |
gh-labels |
Labels for the created issues. | No | |
repo-token |
GitHub token for authentication. | Yes | |
repository |
GitHub repository in the format owner/repo . |
Yes |
Check links in all Markdown files in the repository:
on: [push, pull_request]
name: Markdown Link Check
jobs:
linkCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: your_username/markdown-links-action@v1
Check links only in the docs
directory:
on: [push, pull_request]
name: Check Docs Links
jobs:
linkCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: your_username/markdown-links-action@v1
with:
folder-path: 'docs'
Check only modified files in a pull request:
on: [pull_request]
name: Check Modified Markdown Links
jobs:
linkCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: your_username/markdown-links-action@v1
with:
check-modified-files-only: 'yes'
Interested in contributing? We welcome all contributions, big or small. Check out our Contribution Guide for details.
Distributed under the MIT License. See LICENSE for more information.