|
| 1 | +# Copyright (c) 2026, NVIDIA CORPORATION. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: Build docs |
| 16 | + |
| 17 | +on: |
| 18 | + push: |
| 19 | + # branches: |
| 20 | + # - main |
| 21 | + # - "pull-request/[0-9]+" |
| 22 | + # - "deploy-release/*" |
| 23 | + |
| 24 | +jobs: |
| 25 | + pre-flight: |
| 26 | + uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.64.2 |
| 27 | + |
| 28 | + build-docs: |
| 29 | + needs: [pre-flight] |
| 30 | + if: | |
| 31 | + !(needs.pre-flight.outputs.is_deployment_workflow == 'true') |
| 32 | + uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.57.0 |
| 33 | + |
| 34 | + build-docs-summary: |
| 35 | + needs: [pre-flight, build-docs] |
| 36 | + if: | |
| 37 | + ( |
| 38 | + needs.pre-flight.outputs.is_deployment_workflow == 'true' |
| 39 | + || always() |
| 40 | + ) |
| 41 | + && !cancelled() |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - name: Result |
| 45 | + run: | |
| 46 | + FAILED_JOBS=$(gh run view $GITHUB_RUN_ID --json jobs --jq '[.jobs[] | select(.status == "completed" and .conclusion != "success")] | length') || echo 0 |
| 47 | +
|
| 48 | + if [ "${FAILED_JOBS:-0}" -eq 0 ] || [ "$SKIPPING_IS_ALLOWED" == "true" ]; then |
| 49 | + echo "✅ All previous jobs completed successfully" |
| 50 | + exit 0 |
| 51 | + else |
| 52 | + echo "❌ Found $FAILED_JOBS failed job(s)" |
| 53 | + # Show which jobs failed |
| 54 | + gh run view $GITHUB_RUN_ID --json jobs --jq '.jobs[] | select(.status == "completed" and .conclusion != "success") | .name' |
| 55 | + exit 1 |
| 56 | + fi |
0 commit comments