forked from langchain-ai/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.79 KB
/
test-build-docs.yml
File metadata and controls
65 lines (55 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Documentation Build & Link Validation
#
# This reusable workflow builds documentation using Python/Make and validates
# all internal and external links using Mintlify's link checker.
#
# Usage:
# jobs:
# docs-validation:
# uses: ./.github/workflows/test-build-docs.yml
# with:
# python-version: "3.11"
#
# Requirements:
# - A Makefile with a 'build' target in the repository root
# - Python dependencies managed via uv with a 'test' group
# - Generated documentation compatible with Mintlify link checker
name: Documentation Build & Link Validation
on:
workflow_call:
inputs:
python-version:
required: true
type: string
description: "Python version for building documentation (e.g., '3.11', '3.12')"
env:
UV_FROZEN: "true"
UV_NO_SYNC: "true"
jobs:
build-and-validate:
runs-on: ubuntu-latest
timeout-minutes: 20
name: "Documentation Build & Link Check (Python ${{ inputs.python-version }})"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Python ${{ inputs.python-version }} with uv package manager
uses: "./.github/actions/uv_setup"
id: setup-python
with:
python-version: ${{ inputs.python-version }}
- name: Install Python dependencies
shell: bash
run: uv sync --group test
- name: Build documentation
shell: bash
run: make build
- name: Configure Node.js runtime
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Mintlify CLI
run: npm i -g mint@4.1.0
- name: Validate documentation links
run: mint broken-links 2>&1 | python3 ../scripts/filter_broken_links.py --exclude-integrations
working-directory: build