Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Documentation Validation

on:
push:
branches: [ main, master ]
paths:
- '**/*.md'
- '**/*.markdown'
- '**/*.asc'
- '**/*.adoc'
- '.github/workflows/docs-validation.yml'
- '.docs-validator.toml'

pull_request:
branches: [ main, master ]
paths:
- '**/*.md'
- '**/*.markdown'
- '**/*.asc'
- '**/*.adoc'
- '.github/workflows/docs-validation.yml'
- '.docs-validator.toml'

workflow_dispatch:
inputs:
target_path:
description: 'Path to scan'
required: false
default: '.'
fail_on_error:
description: 'Fail pipeline on errors'
required: false
type: boolean
default: true

jobs:
validate-docs:
name: Validate Documentation Links
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install docs-validator
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/Nokhrin/docs-validator.git

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be running executables out of individual users' repositories. This is not safe.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the security concerns about running executables from individual user repositories. Here are possible solutions:

  1. Publish to PyPI: Package the validator and publish it officially, allowing pip install docs-validator with verified releases.
  2. Use specific version tags: Pin to a specific commit/tag instead of a branch (e.g., @v1.0.0#commit_hash) for reproducibility.
  3. Transfer to OAI organization: Move the repository under OAI's control for official project oversight.
  4. Provide security audit documentation: Share code review results, dependency analysis, and security practices.

Could you clarify which approach aligns with OAI's policies?
What specific actions or documentation would be needed to approve this tool for use in the validation workflow?
I'm happy to implement any required changes.
What timeline would work for resolving this?


- name: Run documentation validation
run: |
FAIL_FLAG=""
if [ "${{ github.event.inputs.fail_on_error }}" = "true" ] || [ -z "${{ github.event.inputs.fail_on_error }}" ]; then
FAIL_FLAG="--fail-on-error"
fi
TARGET_PATH="${{ github.event.inputs.target_path || '.' }}"
docs-validator scan "$TARGET_PATH" --validate $FAIL_FLAG --report markdown --output docs-validation-report.md

- name: Upload validation report
if: always()
uses: actions/upload-artifact@v4
with:
name: docs-validation-report
path: docs-validation-report.md
retention-days: 7