From 4885369d70b1fa2087698ea9ffd7a1cb0059d9ea Mon Sep 17 00:00:00 2001 From: Arkadiusz Balys Date: Tue, 4 Aug 2026 15:44:45 +0200 Subject: [PATCH 1/2] ci: Add PR changes to Documentation build workflow. Now the Github note also contains a list of changed doc files to ease looking for the changes. Signed-off-by: Arkadiusz Balys --- .github/workflows/doc_build.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/doc_publish.yml | 3 +-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc_build.yml b/.github/workflows/doc_build.yml index 95bb37e1..f380a434 100644 --- a/.github/workflows/doc_build.yml +++ b/.github/workflows/doc_build.yml @@ -44,6 +44,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 0 - name: Load doc add-on config uses: ./.github/actions/load-doc-config @@ -109,6 +110,33 @@ jobs: mv "${MONITOR}" "$PUBLISH" if [[ -f pr.txt ]]; then mv pr.txt "$PUBLISH"; fi + - name: Find Matter add-on edited documents + if: github.event_name == 'pull_request' + run: | + PUBLISH="docs/publish" + mkdir -p "$PUBLISH" + COMMENT="${PUBLISH}/comment.txt" + PREFIX="${{ vars.NCS_DOC_PR_HOSTING_URL }}addons/${{ env.DOC_ADDON_NAME }}/PR-${{ github.event.pull_request.number }}/" + CHANGED=$(git diff --name-only --diff-filter=d "${{ github.event.pull_request.base.sha }}..HEAD") + + echo "You can find the documentation preview for this PR [here](${PREFIX})." > "${COMMENT}" + + DOCS=$(echo "$CHANGED" | \ + grep -e "^docs/" | \ + grep -e ".rst$" | \ + sed -e "s#^docs\(.*\)\.rst#${PREFIX}\1.html#g") + + SAMPLES=$(echo "$CHANGED" | \ + grep -e "^samples/" | \ + grep -e ".rst$" | \ + sed -e "s#^samples\(.*\)\.rst#${PREFIX}samples\1.html#g") + + DOCS_ALL=$(printf "%s\n%s" "$DOCS" "$SAMPLES" | sed '/^$/d') + + if [ -n "$DOCS_ALL" ]; then + printf "\nPreview links for modified Matter add-on documents:\n\n%s" "$DOCS_ALL" >> "${COMMENT}" + fi + - name: Store if: ${{ !contains(github.event.pull_request.labels.*.name, 'external') || contains(github.event.pull_request.labels.*.name, 'CI-trusted-author') }} uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 diff --git a/.github/workflows/doc_publish.yml b/.github/workflows/doc_publish.yml index 94b97ae9..6fe3bf9a 100644 --- a/.github/workflows/doc_publish.yml +++ b/.github/workflows/doc_publish.yml @@ -78,6 +78,5 @@ jobs: with: comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ env.PR }} - body: | - You can find the documentation preview for this PR [here](${{ vars.NCS_DOC_PR_HOSTING_URL }}addons/${{ env.DOC_ADDON_NAME }}/PR-${{ env.PR }}/). + body-path: comment.txt edit-mode: replace From f9d6d15bc324864920820c48af310e75782c2b9b Mon Sep 17 00:00:00 2001 From: Arkadiusz Balys Date: Tue, 4 Aug 2026 15:53:44 +0200 Subject: [PATCH 2/2] doc: Change Matter WS and Bridge naming from application to sample We should start naming Matter WS and Bridge as sample. Signed-off-by: Arkadiusz Balys --- docs/bridge/matter_bridge_description.rst | 2 +- samples/weather_station/README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/bridge/matter_bridge_description.rst b/docs/bridge/matter_bridge_description.rst index 1107cfd3..5e8698f0 100644 --- a/docs/bridge/matter_bridge_description.rst +++ b/docs/bridge/matter_bridge_description.rst @@ -1,5 +1,5 @@ .. |matter_name| replace:: Matter bridge -.. |matter_type| replace:: application +.. |matter_type| replace:: sample .. |matter_dks_thread| replace:: ``nrf52840dk/nrf52840``, ``nrf5340dk/nrf5340/cpuapp``, ``nrf54l15dk/nrf54l15/cpuapp``, ``nrf54lm20dk/nrf54lm20b/cpuapp``, and ``nrf54lm20dk/nrf54lm20a/cpuapp`` board targets .. |matter_dks_wifi| replace:: ``nrf54lm20dk/nrf54lm20b/cpuapp`` and ``nrf54lm20dk/nrf54lm20a/cpuapp`` board targets with the ``nrf7002eb2`` shield attached .. |matter_dks_internal| replace:: nRF54LM20 DK diff --git a/samples/weather_station/README.rst b/samples/weather_station/README.rst index 6c16b9d0..f771813f 100644 --- a/samples/weather_station/README.rst +++ b/samples/weather_station/README.rst @@ -1,5 +1,5 @@ .. |matter_name| replace:: weather station -.. |matter_type| replace:: application +.. |matter_type| replace:: sample .. |matter_dks_thread| replace:: ``thingy53/nrf5340/cpuapp`` and ``nrf54l15tag/nrf54l15/cpuapp`` board targets .. |matter_dks_wifi| replace:: ``thingy53/nrf5340/cpuapp`` board target with the ``nrf7002eb`` expansion board attached .. |sample path| replace:: :file:`applications/matter_weather_station`