From 4f7aea1456feef21e523e0b95a4c02672910a5f4 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 21 Oct 2022 22:53:35 +0000 Subject: [PATCH] fix docs push (#87498) 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 --- .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