-
Notifications
You must be signed in to change notification settings - Fork 38
100 lines (92 loc) · 3.51 KB
/
docs-build.yml
File metadata and controls
100 lines (92 loc) · 3.51 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: "[CI/CD] Build Docs"
run-name: "[CI/CD] Build Docs"
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
- release-*
workflow_dispatch: {}
permissions:
contents: read # needed for actions/checkout
jobs:
filter:
name: "Filter Changed Documentation Paths"
runs-on: ubuntu-latest
outputs:
toplevel_changed: ${{ steps.filter.outputs.toplevel }}
autocalibration_changed: ${{ steps.filter.outputs.autocalibration }}
controller_changed: ${{ steps.filter.outputs.controller }}
cluster_analytics_changed: ${{ steps.filter.outputs.cluster_analytics }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set paths filter
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: |
toplevel:
- 'docs/**'
autocalibration:
- 'autocalibration/docs/**'
controller:
- 'controller/docs/**'
cluster_analytics:
- 'cluster_analytics/docs/**'
build_toplevel:
name: "Build Toplevel Documentation"
needs: filter
if: ${{ needs.filter.outputs.toplevel_changed == 'true' }}
uses: ./.github/workflows/build-documentation.yml
secrets:
SYS_EMF_GH_TOKEN: ${{ secrets.SYS_EMF_GH_TOKEN }}
DOC_AWS_ACCESS_KEY_ID: ${{ secrets.DOC_AWS_ACCESS_KEY_ID }}
DOC_AWS_SECRET_ACCESS_KEY: ${{ secrets.DOC_AWS_SECRET_ACCESS_KEY }}
with:
exclude_patterns: "README.md, adr, design, development"
build_autocalibration:
name: "Build AutoCalibration Documentation"
needs: filter
if: ${{ needs.filter.outputs.autocalibration_changed == 'true' }}
uses: ./.github/workflows/build-documentation.yml
secrets:
SYS_EMF_GH_TOKEN: ${{ secrets.SYS_EMF_GH_TOKEN }}
DOC_AWS_ACCESS_KEY_ID: ${{ secrets.DOC_AWS_ACCESS_KEY_ID }}
DOC_AWS_SECRET_ACCESS_KEY: ${{ secrets.DOC_AWS_SECRET_ACCESS_KEY }}
with:
docs_directory: autocalibration
build_controller:
name: "Build Controller Documentation"
needs: filter
if: ${{ needs.filter.outputs.controller_changed == 'true' }}
uses: ./.github/workflows/build-documentation.yml
secrets:
SYS_EMF_GH_TOKEN: ${{ secrets.SYS_EMF_GH_TOKEN }}
DOC_AWS_ACCESS_KEY_ID: ${{ secrets.DOC_AWS_ACCESS_KEY_ID }}
DOC_AWS_SECRET_ACCESS_KEY: ${{ secrets.DOC_AWS_SECRET_ACCESS_KEY }}
with:
docs_directory: controller
build_status:
name: "Documentation Build Status"
runs-on: ubuntu-latest
if: always()
needs:
- filter
- build_toplevel
- build_autocalibration
- build_controller
steps:
- name: "Set documentation build status"
run: |
if [[ "${{ needs.filter.result }}" != "success" && "${{ needs.filter.result }}" != "skipped" ]] || \
[[ "${{ needs.build_toplevel.result }}" != "success" && "${{ needs.build_toplevel.result }}" != "skipped" ]] || \
[[ "${{ needs.build_autocalibration.result }}" != "success" && "${{ needs.build_autocalibration.result }}" != "skipped" ]] || \
[[ "${{ needs.build_controller.result }}" != "success" && "${{ needs.build_controller.result }}" != "skipped" ]]; then
echo "One or more jobs failed"
exit 1
else
echo "All jobs succeeded or were skipped"
exit 0
fi