From 4e1a4b150a4ccd5f401a4293a0336a9a8a1dad2d Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Mon, 24 Oct 2022 15:42:56 -0400 Subject: [PATCH] fix docs push (#87498) (#87628) push docs to temp branch first then push to actual branch to satisfy CLA check in branch protections Pull Request resolved: https://github.com/pytorch/pytorch/pull/87498 Approved by: https://github.com/malfet Co-authored-by: Catherine Lee --- .circleci/scripts/cpp_doc_push_script.sh | 3 +++ .circleci/scripts/python_doc_push_script.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.circleci/scripts/cpp_doc_push_script.sh b/.circleci/scripts/cpp_doc_push_script.sh index 4c22677e94bd..6e66514ae93b 100755 --- a/.circleci/scripts/cpp_doc_push_script.sh +++ b/.circleci/scripts/cpp_doc_push_script.sh @@ -98,6 +98,9 @@ git commit -m "Generate C++ docs from pytorch/pytorch@${GITHUB_SHA}" || true git status if [[ "${WITH_PUSH:-}" == true ]]; then + # push to a temp branch first to trigger CLA check and satisfy branch protections + git push -u origin HEAD:pytorchbot/temp-branch-cpp -f + sleep 30 git push -u origin fi diff --git a/.circleci/scripts/python_doc_push_script.sh b/.circleci/scripts/python_doc_push_script.sh index f9b019ec069b..d255f77c82e8 100755 --- a/.circleci/scripts/python_doc_push_script.sh +++ b/.circleci/scripts/python_doc_push_script.sh @@ -135,6 +135,9 @@ git commit -m "Generate Python docs from pytorch/pytorch@${GITHUB_SHA}" || true git status if [[ "${WITH_PUSH:-}" == true ]]; then + # push to a temp branch first to trigger CLA check and satisfy branch protections + git push -u origin HEAD:pytorchbot/temp-branch-py -f + sleep 30 git push -u origin "${branch}" fi