ci: add link checker, README convention check and PR templat

This commit is contained in:
Meysam Parvizi
2026-10-09 17:08:26 +02:00
parent 718dc4c1a2
commit a6e614bd7b
8 changed files with 160 additions and 44 deletions
+44
View File
@@ -0,0 +1,44 @@
name: Link check
on:
schedule:
- cron: "0 6 * * 1"
pull_request:
paths:
- "**/*.md"
- ".github/lychee.toml"
workflow_dispatch:
permissions:
contents: read
issues: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lychee:
name: Check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check links
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --config .github/lychee.toml --no-progress "**/*.md"
output: lychee/out.md
# Pull requests report broken links without blocking; scheduled runs fail and open an issue.
fail: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Report broken links
if: github.event_name != 'pull_request' && steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link check report
content-filepath: lychee/out.md
labels: broken-links
+33
View File
@@ -0,0 +1,33 @@
name: Markdown lint
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
markdownlint:
name: Markdown lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v19
with:
globs: "**/*.md"
readme-conventions:
name: README conventions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check entry format and duplicates
run: python3 .github/scripts/check_readme.py
-32
View File
@@ -1,32 +0,0 @@
name: Static Analysis
on:
push:
pull_request:
workflow_dispatch:
jobs:
markdownlint:
name: Markdown Lint Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: |
echo "🔍 Checking Markdown files..."
if find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | head -1 | grep -q .; then
find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" -print0 | xargs -0 markdownlint --config .markdownlint.json || markdownlint **/*.md
echo "✅ Markdown lint check completed successfully"
else
echo "ℹ️ No Markdown files found to check"
fi