Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/doc_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/bridge/matter_bridge_description.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/weather_station/README.rst
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
Loading