Skip to content

Commit

Permalink
adding markdownflow to check links
Browse files Browse the repository at this point in the history
  • Loading branch information
Khushalsarode committed Oct 28, 2024
1 parent 8a4743f commit 4ef0305
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/markdown_files_link_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check Markdown Links

on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, reopened, synchronize]

jobs:
markdown-link-check:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# Set up Node.js (required for markdown-link-check)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

# Install markdown-link-check
- name: Install markdown-link-check
run: |
npm install -g markdown-link-check
# Find and check all Markdown files
- name: Check links in Markdown files
run: |
# Find all .md files and check their links
find . -name "*.md" | while read file; do
echo "Checking $file"
markdown-link-check "$file" -q || echo "$file contains broken links"
done

0 comments on commit 4ef0305

Please sign in to comment.