Skip to content

Commit 1aaba74

Browse files
Balandatfacebook-github-bot
authored andcommitted
Retain gh-pages commit history when pushing new version of website (#281)
Summary: Previously, we force-pushed a newly inited repo - now we actually push the changes. Pull Request resolved: #281 Test Plan: see D17602805 Reviewed By: Jakepodell Differential Revision: D17665701 Pulled By: Balandat fbshipit-source-id: f8eb1474980ac37cb90ccac63dc7bd24e0fc133c
1 parent 7f7aeca commit 1aaba74

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/publish_site.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,13 @@ else
209209
python3 botorch-master/scripts/update_versions_html.py -p "${WORK_DIR}"
210210
cp -R botorch-master/.circleci new-site/
211211

212-
# Init as Git repo and push to gh-pages
213-
cd new-site || exit
214-
git init
212+
# move contents of newsite to botorch-gh-pages, preserving commit history
213+
rm -rfv ./botorch-gh-pages/*
214+
rsync -avh ./new-site/ ./botorch-gh-pages/
215+
cd botorch-gh-pages || exit
215216
git add --all
216217
git commit -m "Publish version ${VERSION} of site"
217-
git push --force "[email protected]:pytorch/botorch.git" master:gh-pages
218+
git push
218219

219220
fi
220221

0 commit comments

Comments
 (0)