From 67b2f261a162117e8011b24f1d2c39823f6c66f9 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 25 Sep 2021 23:50:39 +0000 Subject: [PATCH] fix build-docs to create gh-pages branch --- build-docs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-docs.sh b/build-docs.sh index b03c22ab9..1bf8fb112 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,5 +1,7 @@ #! /bin/bash +set -x + REMOTE=origin set -e @@ -13,6 +15,8 @@ fi cargo build -p taskchampion-cli --features usage-docs --bin usage-docs # create a worktree of this repo, with the `gh-pages` branch checked out +git branch -D gh-pages 2>/dev/null || true +git checkout -b gh-pages $REMOTE/gh-pages if ! [ -d ./docs/tmp ]; then git worktree add docs/tmp gh-pages fi