Files
sporel-tool-ci/.gitea/workflows/reusable-docs.yml
Axel Meyer 32f91c56ba ci(docs): fix lychee --exclude (regex, not glob)
"**/archive/**" was being passed as a regex via --exclude-path,
causing 'repetition operator missing expression' parse error.
lychee --exclude takes a regex pattern; use '/archive/' to match
any URL/path containing an archive segment.
2026-05-04 20:23:23 +02:00

49 lines
1.4 KiB
YAML

# Reusable workflow: Meta / Docs / Tool (Cat 5 per ADR-0025)
# Markdown lint + internal link check
name: Docs CI
on:
workflow_call:
inputs:
lint_paths:
description: "Glob of paths to lint"
type: string
default: "**/*.md"
ignore_paths:
description: "Glob of paths to skip (e.g. archive)"
type: string
default: "**/archive/**"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdownlint-cli2
run: npm install -g markdownlint-cli2
- name: Run markdownlint
run: |
markdownlint-cli2 "${{ inputs.lint_paths }}" "!${{ inputs.ignore_paths }}" || \
(echo "::warning::markdown lint warnings (non-blocking)" && true)
- name: Internal link check (lychee)
uses: lycheeverse/lychee-action@v2
with:
# First positional arg is the input glob (files to scan).
# --exclude is a regex (not glob), matched against URL/path strings.
# We exclude any path component named "archive".
args: --offline --no-progress --include-fragments "**/*.md" --exclude '/archive/'
fail: true
- name: README presence (root)
run: |
test -s README.md || (echo "::warning::no README.md at repo root" && true)