66
77env :
88 DESTINATION_BRANCH : docs/automatic-gitbook-update-readme
9- COMMIT_MESSAGE : " docs: synchronizing README from snyk/user-docs"
9+ COMMIT_MESSAGE : ' docs: synchronizing README from snyk/user-docs'
1010
1111jobs :
1212 build :
3131 - name : Configure git user
3232 run : |
3333 git config --global user.email "noreply@snyk.io"
34-
34+
3535 # GITHUB_ACTOR: The name of the person or app that initiated the workflow.
3636 git config --global user.name "$GITHUB_ACTOR"
3737
@@ -43,14 +43,14 @@ jobs:
4343 git checkout ${{ env.DESTINATION_BRANCH }}
4444 exit 0
4545 fi
46-
46+
4747 echo "Branch ${{ env.DESTINATION_BRANCH }} does not exist, creating and checking out."
4848 git checkout -b ${{ env.DESTINATION_BRANCH }}
4949
5050 - name : Retrieve GitBook content and update README
5151 run : |
5252 cp ./docs/snyk-cli/getting-started-with-the-snyk-cli.md ./cli/README.md
53-
53+
5454 # GitBook Markdown files often use relative paths for assets (e.g., images)
5555 # like `../.gitbook/assets/image.png`. When this README.md is viewed directly
5656 # on GitHub, these relative paths won't resolve correctly. This `sed` command
8282 echo "--- Documentation changes detected from GitBooks (before Prettier) ---"
8383 git --no-pager diff --color=always
8484 echo "---------------------------------------------------------------------"
85-
85+
8686 echo "continue=true" >> "$GITHUB_OUTPUT"
8787
8888 - name : Commit and push changes (if any)
@@ -108,7 +108,7 @@ jobs:
108108 echo "Pushed changes to existing PR #$PR_NUMBER."
109109 exit 0
110110 fi
111-
111+
112112 echo "No existing PR found. Creating a new one."
113113 gh pr create \
114114 --title="${{ env.COMMIT_MESSAGE }}" \
0 commit comments