From 42147a13e72407db9cfe5de7655397a4e1629565 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 11 Jun 2019 10:14:54 +1000 Subject: [PATCH] Fix push-docs script when gh-pages doesn't exist yet --- scripts/push-docs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/push-docs b/scripts/push-docs index eadfb3b9..fea29d29 100755 --- a/scripts/push-docs +++ b/scripts/push-docs @@ -24,7 +24,9 @@ git config user.email "${GITHUB_EMAIL:-no-reply@redhat.com}" if enabled; then git remote add origin "https://$GITHUB_TOKEN@github.com/$ORG/$REPO.git" git fetch origin - git reset origin/gh-pages + if git rev-parse origin/gh-pages; then + git reset origin/gh-pages + fi fi git add -A .