-
Notifications
You must be signed in to change notification settings - Fork 235
59 lines (52 loc) · 1.73 KB
/
check-documented-examples.yml
File metadata and controls
59 lines (52 loc) · 1.73 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
---
name: '[Optional] Docs example'
on:
pull_request:
branches:
- '**'
paths:
- examples/**/*.py
- '!examples/03_github_workflows/**'
- '!examples/04_llm_specific_tools/**'
- .github/workflows/check-documented-examples.yml
- .github/scripts/check_documented_examples.py
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
check-examples:
runs-on: ubuntu-latest
steps:
- name: Checkout agent-sdk repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Checkout docs repository (try feature branch)
uses: actions/checkout@v5
continue-on-error: true
id: checkout-feature
with:
repository: OpenHands/docs
path: docs
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
- name: Checkout docs repository (fallback to main)
if: steps.checkout-feature.outcome == 'failure'
uses: actions/checkout@v5
with:
repository: OpenHands/docs
path: docs
fetch-depth: 0
ref: main
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Check documented examples
env:
DOCS_PATH: ${{ github.workspace }}/docs
shell: bash
run: |
set -euo pipefail
python .github/scripts/check_documented_examples.py