Skip to content

Commit e353436

Browse files
mpolson64facebook-github-bot
authored andcommitted
Change git push command in publish_site v2 (#1472)
Summary: Pull Request resolved: #1472 Reviewed By: saitcakmak Differential Revision: D43683175 fbshipit-source-id: 2387ad1ef19c3962e3250eb5c5f7899baeeca6ed
1 parent e696124 commit e353436

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/publish_site.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ if [[ $VERSION == false ]]; then
144144

145145
# erase git history then force push to overwrite
146146
cd Ax-gh-pages || exit
147-
git checkout --orphan latest
147+
rm -rf .git
148+
git init -b main
148149
git add --all
149150
git commit -m 'Update latest version of site'
150-
git push --force origin latest:gh-pages
151+
git push --force "[email protected]:facebook/Ax" main:gh-pages
151152

152153
else
153154
echo "-----------------------------------------"
@@ -221,10 +222,10 @@ else
221222

222223
# Init as Git repo and push to gh-pages
223224
cd new-site || exit
224-
git checkout --orphan latest
225+
git init -b main
225226
git add --all
226227
git commit -m "Publish version ${VERSION} of site"
227-
git push --force origin latest:gh-pages
228+
git push --force "[email protected]:facebook/Ax" main:gh-pages
228229

229230
fi
230231

0 commit comments

Comments
 (0)