-
Notifications
You must be signed in to change notification settings - Fork 4.5k
79 lines (71 loc) · 2.04 KB
/
Copy pathci-docs.yml
File metadata and controls
79 lines (71 loc) · 2.04 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Run Docs CI"
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
UV_FROZEN: "1"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
run_docs: ${{ steps.filter.outputs.run_docs }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Detect changed paths
id: filter
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
filters: |
run_docs:
- ".github/workflows/**"
- ".github/actions/**"
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
- "docling/**"
- "docs/**"
build-docs:
needs: changes
if: ${{ needs.changes.outputs.run_docs == 'true' }}
uses: ./.github/workflows/docs.yml
with:
deploy: false
docs-status:
if: ${{ always() }}
needs:
- changes
- build-docs
runs-on: ubuntu-latest
timeout-minutes: 5
permissions: {}
steps:
- name: Check docs result
env:
CHANGES_RESULT: ${{ needs.changes.result }}
BUILD_DOCS_RESULT: ${{ needs.build-docs.result }}
run: |
if [ "$CHANGES_RESULT" != "success" ]; then
echo "::error title=Docs changes job failed::changes result was $CHANGES_RESULT"
exit 1
fi
case "$BUILD_DOCS_RESULT" in
success)
echo "Docs checks passed."
;;
skipped)
echo "Docs checks are not required for this change set."
;;
*)
echo "::error title=Docs checks failed::build-docs result was $BUILD_DOCS_RESULT"
exit 1
;;
esac