Skip to content

Commit edd6dd4

Browse files
[DOCS] Add new documentation checks to align with other OEP repositories
Signed-off-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>
1 parent 52a98f7 commit edd6dd4

3 files changed

Lines changed: 130 additions & 4 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: "Build Documentation"
6+
7+
on: # yamllint disable-line rule:truthy rule:line-length
8+
workflow_call:
9+
inputs:
10+
docs_directory:
11+
description: >-
12+
Documentation directory where the job will run, defaults to '.'
13+
required: false
14+
default: "."
15+
type: string
16+
simple_mode:
17+
description: >-
18+
When true, override configuration for simple documentation sites
19+
required: false
20+
default: true
21+
type: boolean
22+
exclude_patterns:
23+
description: >-
24+
Comma separated list of exclude patterns to use during the build,
25+
defaults to empty list
26+
required: false
27+
default: ""
28+
type: string
29+
30+
permissions:
31+
contents: read
32+
33+
jobs:
34+
build-documentation:
35+
permissions:
36+
contents: read # minimal privilege required
37+
runs-on: ubuntu-latest
38+
env:
39+
DOCS_DIR: ${{ inputs.docs_directory }}
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
with:
44+
# Fetch all history, otherwise sporadic issue with missing tags
45+
fetch-depth: 0
46+
# Fetch tags
47+
fetch-tags: true
48+
# Checkout the branch that triggered the workflow
49+
# to avoid detached HEAD
50+
ref: ${{ github.event.pull_request.head.sha || github.head_ref }}
51+
persist-credentials: false
52+
53+
- name: Download template
54+
if: ${{ inputs.simple_mode }}
55+
shell: bash
56+
run: |
57+
cd "${GITHUB_WORKSPACE}/${DOCS_DIR}"
58+
wget https://docs.openedgeplatform.intel.com/template/template.tar.gz
59+
# Override any existing files with template
60+
tar xf template.tar.gz
61+
if [ -f "dictionary_append.txt" ]; then
62+
cat "dictionary_append.txt" >> "dict.txt"
63+
fi
64+
65+
- name: Add exclude patterns
66+
env:
67+
EXCLUDE: ${{ inputs.exclude_patterns }}
68+
shell: bash
69+
run: |
70+
# Remove any spaces
71+
exclude_no_spaces="${EXCLUDE// /}"
72+
# Surround patterns with quotes and create Python list
73+
exclude_pattern="[\"${exclude_no_spaces//,/\", \"}\"]"
74+
conf_files=$(find "${GITHUB_WORKSPACE}" -type f -path "*/docs/conf.py")
75+
for conf_file in $conf_files; do
76+
echo "exclude_patterns.extend(${exclude_pattern})" >> "$conf_file"
77+
done
78+
79+
- name: Build Documentation
80+
env:
81+
SIMPLE_MODE: ${{ inputs.simple_mode }}
82+
shell: bash
83+
run: |
84+
cd "${GITHUB_WORKSPACE}/${DOCS_DIR}"
85+
make build
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Documentation Check
6+
7+
on: # yamllint disable-line rule:truthy
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
13+
permissions: {}
14+
15+
jobs:
16+
filter:
17+
permissions:
18+
contents: read # needed for actions/checkout
19+
runs-on: ubuntu-latest
20+
outputs:
21+
dlstreamer_documentation_changed: ${{ steps.filter.outputs.dlstreamer_documentation }}
22+
steps:
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
- name: Set paths filter
27+
id: filter
28+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
29+
with:
30+
filters: |
31+
dlstreamer_documentation:
32+
- 'docs/source/**'
33+
34+
build-dlstreamer-documentation:
35+
permissions:
36+
contents: read # needed for actions/checkout
37+
needs: filter
38+
if: ${{ needs.filter.outputs.dlstreamer_documentation_changed == 'true' }}
39+
uses: ./.github/workflows/docs-reusable-workflow.yaml
40+
with:
41+
docs_directory: .

docs/user-guide/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ classify, track, identify and count objects, events and people. The
3131
analyzed results can be used to take actions, coordinate events,
3232
identify patterns and gain insights across multiple domains, including:
3333

34-
- retail store and events facilities analytics
35-
- warehouse and parking management
36-
- industrial inspections
37-
- safety and regulatory compliance
34+
- retail store and events facilities analytics,
35+
- warehouse and parking management,
36+
- industrial inspections,
37+
- safety and regulatory compliance,
3838
- security monitoring.
3939

4040
![image](_images/overview_pipeline_example.png)

0 commit comments

Comments
 (0)