Skip to content

Commit

Permalink
Update docs-workflow.yaml
Browse files Browse the repository at this point in the history
Add comparison and substitution for GET_STARTED.md
in documentation workflow.

Closes #79

Signed-off-by: Osman Hadzic <osman.hadzic@secomind.com>
  • Loading branch information
osmanhadzic committed Nov 13, 2024
1 parent 062921f commit a93f4cc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/docs-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ jobs:
rm -rf docs/$DOCS_DIRNAME
mkdir -p docs/$DOCS_DIRNAME
cp -r astarte-device-sdk-csharp/docs/out/html/* docs/$DOCS_DIRNAME/
- name: Compare and copy get started
id: cmp-and-copy-get-started
if: steps.check-release-branch.outputs.RESULT == 'OK'
run: |
our_get_started="./astarte-device-sdk-csharp/GET_STARTED.md"
their_get_started="./sdk-doc/source/get_started/csharp.md"
if cmp -s "$our_get_started" "$their_get_started"; then
echo "Get started are identical, no need for substitution"
echo "RESULT=NO_SUBSTITUTION" >> $GITHUB_OUTPUT
else
echo "Our get started is different, substituting theirs"
cp "$our_get_started" "$their_get_started"
echo "RESULT=SUBSTITUTION" >> $GITHUB_OUTPUT
fi
- name: Commit files
working-directory: ./docs
run: |
Expand Down

0 comments on commit a93f4cc

Please sign in to comment.