Skip to content

chore(gitignore): add gitignore rules for generated documentation art… #1

chore(gitignore): add gitignore rules for generated documentation art…

chore(gitignore): add gitignore rules for generated documentation art… #1

Workflow file for this run

name: Documentation Quality Check
on:
pull_request:
paths:
- "docs/**"
- "*.md"
- "frontend/**/*.md"
push:
branches: [main, master]
paths:
- "docs/**"
- "*.md"
- "frontend/**/*.md"
jobs:
docs-quality:
name: Documentation Quality 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"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
cd frontend
npm ci
- name: Run markdown linting
run: |
cd frontend
npm run lint:md
- name: Check README links
run: |
cd frontend
npm run lint:links:readme
continue-on-error: true
- name: Check docs links (sample)
run: |
cd frontend
# Check a few key documentation files
npx markdown-link-check ../docs/README.md || true
npx markdown-link-check ../docs/developer/README.md || true
npx markdown-link-check ../docs/operations/README.md || true
continue-on-error: true
- name: Run comprehensive link check
run: |
cd frontend
../scripts/utils/monitor-docs-links.sh || true
continue-on-error: true
- name: Generate search index
run: |
cd frontend
../scripts/utils/generate-search-index.sh
continue-on-error: true
- name: Validate documentation templates
run: |
cd frontend
# Check that templates are valid markdown
echo "Validating documentation templates..."
for template in ../docs/templates/*.md; do
echo "Checking template: $template"
npx markdownlint-cli2 "$template" || echo "Template $template has issues"
done
continue-on-error: true
- name: Generate quality report
run: |
cd frontend
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
TOTAL_FILES=$(find .. -name "*.md" -not -path "*/node_modules/*" -not -path "*/dist/*" | wc -l)
echo "# 📊 Documentation Quality Report" > ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "**Generated**: $TIMESTAMP" >> ../docs-quality-report.md
echo "**Total Files**: $TOTAL_FILES" >> ../docs-quality-report.md
echo "**Workflow**: [View Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "## ✅ Checks Performed" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "- **Markdown Linting**: All files pass formatting checks" >> ../docs-quality-report.md
echo "- **Link Validation**: Checked internal and external links" >> ../docs-quality-report.md
echo "- **Template Validation**: Verified documentation templates" >> ../docs-quality-report.md
echo "- **Search Index**: Generated searchable documentation index" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "## 🔗 Link Health" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
if [ -d "../reports/documentation" ] && [ "$(ls -A ../reports/documentation)" ]; then
echo "Detailed link check results are available in the uploaded artifacts." >> ../docs-quality-report.md
else
echo "⚠️ Link checking may have encountered issues. Check the workflow logs." >> ../docs-quality-report.md
fi
echo "" >> ../docs-quality-report.md
echo "## 🔍 Search Functionality" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
if [ -f "public/search/index.json" ]; then
SEARCH_DOCS=$(jq length public/search/index.json 2>/dev/null || echo "unknown")
echo "✅ Search index generated with $SEARCH_DOCS documents" >> ../docs-quality-report.md
else
echo "⚠️ Search index generation may have failed" >> ../docs-quality-report.md
fi
echo "" >> ../docs-quality-report.md
echo "## 📈 Recommendations" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "- Monitor link health weekly" >> ../docs-quality-report.md
echo "- Update broken external links promptly" >> ../docs-quality-report.md
echo "- Use templates for consistent documentation" >> ../docs-quality-report.md
echo "- Keep search index updated with content changes" >> ../docs-quality-report.md
echo "" >> ../docs-quality-report.md
echo "---" >> ../docs-quality-report.md
echo "*Generated by Documentation Quality Workflow*" >> ../docs-quality-report.md
- name: Upload quality report
uses: actions/upload-artifact@v4
with:
name: docs-quality-report
path: docs-quality-report.md
retention-days: 30
- name: Upload link check reports
uses: actions/upload-artifact@v4
if: always()
with:
name: link-check-reports
path: reports/documentation/
retention-days: 30
- name: Upload search index
uses: actions/upload-artifact@v4
if: always()
with:
name: search-index
path: frontend/public/search/
retention-days: 30