Skip to content

Commit c7f7591

Browse files
author
kiran-garre
committed
Test workflow 2; commit only docs
1 parent 85d78fb commit c7f7591

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs-generation/create-docs-pr.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ fi
1313
git config user.name "docs-generator[bot]"
1414
git config user.email "docs-generator[bot]@amazon.com"
1515

16-
# Create branch and push
17-
git checkout -b "$BRANCH_NAME"
18-
git add .
16+
# Create branch, pull if needed (for updating existing docs PRs), and push
17+
git checkout -B "$BRANCH_NAME"
18+
if git ls-remote --exit-code --heads origin $BRANCH_NAME; then
19+
git pull origin $BRANCH_NAME
20+
fi
21+
git add docs
1922
git commit -m "Update docs based on PR #$PR_NUMBER
2023
2124
Auto-generated by Q"

0 commit comments

Comments
 (0)