Skip to content

Commit

Permalink
ci: doc: always report status
Browse files Browse the repository at this point in the history
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Feb 19, 2024
1 parent b2b4016 commit 6755c17
Showing 1 changed file with 54 additions and 15 deletions.
69 changes: 54 additions & 15 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ on:
tags:
- v*
pull_request:
paths:
- 'doc/**'
- '**.rst'
- 'include/**'
- 'kernel/include/kernel_arch_interface.h'
- 'lib/libc/**'
- 'subsys/testsuite/ztest/include/**'
- 'tests/**'
- '**/Kconfig*'
- 'west.yml'
- '.github/workflows/doc-build.yml'
- 'scripts/dts/**'
- 'doc/requirements.txt'

env:
# NOTE: west docstrings will be extracted from the version listed here
Expand All @@ -33,16 +20,60 @@ env:
DOXYGEN_VERSION: 1.9.6

jobs:
doc-file-check:
name: Check for doc changes
runs-on: ubuntu-22.04
if: >
github.repository_owner == 'zephyrproject-rtos'
outputs:
file_check: ${{ steps.check-doc-files.outputs.any_changed }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Check if Documentation related files changed
uses: tj-actions/changed-files@v42
id: check-doc-files
with:
files: |
doc/**
**.rst
include/**
kernel/include/kernel_arch_interface.h
lib/libc/**
subsys/testsuite/ztest/include/**
tests/**
**/Kconfig*
west.yml
scripts/dts/**
doc/requirements.txt
.github/workflows/doc-build.yml
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.check-doc-files.outputs.all_changed_files }}
run: |
echo ${{ steps.check-doc-files.outputs.any_changed }}
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
doc-build-html:
name: "Documentation Build (HTML)"
if: github.repository_owner == 'zephyrproject-rtos'
runs-on: zephyr-runner-linux-x64-4xlarge
needs: [doc-file-check]
if: github.repository_owner == 'zephyrproject-rtos'&& (${{fromJSON(needs.doc-file-check.outputs.file_check)}} == 'true')
#runs-on: zephyr-runner-linux-x64-4xlarge
runs-on: ubuntu-22.04
timeout-minutes: 45
concurrency:
group: doc-build-html-${{ github.ref }}
cancel-in-progress: true

steps:
- name: test
run: |
echo ${{fromJSON(needs.doc-file-check.outputs.file_check)}}
- name: checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -217,3 +248,11 @@ jobs:
path: |
doc/_build/latex/zephyr.pdf
doc/_build/latex/zephyr.log
doc-build-pass:
name: "Documentation Build Passed"
runs-on: ubuntu-22.04
needs: [doc-build-html]
steps:
- name: doc-check
run: echo "Documentation build Passed"

0 comments on commit 6755c17

Please sign in to comment.