Skip to content

Commit 3e929db

Browse files
Check out docs submodule with SSH. (googleapis#3223)
1 parent 761f2c6 commit 3e929db

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

test_utils/scripts/update_docs.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
set -ev
1818

19-
GH_OWNER="GoogleCloudPlatform"
20-
GH_PROJECT_NAME="google-cloud-python"
19+
GH_OWNER='GoogleCloudPlatform'
20+
GH_PROJECT_NAME='google-cloud-python'
2121

2222
# Function to build the docs.
2323
function build_docs {
@@ -40,10 +40,9 @@ fi
4040

4141
# Adding GitHub pages branch. `git submodule add` checks it
4242
# out at HEAD.
43-
GH_PAGES_DIR="ghpages"
43+
GH_PAGES_DIR='ghpages'
4444
git submodule add -q -b gh-pages \
45-
"https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME}" \
46-
${GH_PAGES_DIR}
45+
"git@github.com:${GH_OWNER}/${GH_PROJECT_NAME}" ${GH_PAGES_DIR}
4746

4847
# Determine if we are building a new tag or are building docs
4948
# for master. Then build new docs in docs/_build from master.
@@ -87,12 +86,10 @@ if [[ -z "$(git status --porcelain)" ]]; then
8786
fi
8887

8988
# Commit to gh-pages branch to apply changes.
90-
git config --global user.email "circle@circleci.com"
91-
git config --global user.name "CircleCI"
89+
git config --global user.email "googleapis-publisher@google.com"
90+
git config --global user.name "Google APIs Publisher"
9291
git commit -m "Update docs after merge to master."
9392

9493
# NOTE: This may fail if two docs updates (on merges to master)
9594
# happen in close proximity.
96-
git push -q \
97-
"https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME}" \
98-
HEAD:gh-pages
95+
git push -q origin HEAD:gh-pages

0 commit comments

Comments
 (0)