more build-docs fixes

This commit is contained in:
Dustin J. Mitchell
2021-09-26 09:33:37 -04:00
parent c62eeb4fcb
commit bfb732947c

View File

@@ -17,13 +17,14 @@ cargo build -p taskchampion-cli --features usage-docs --bin usage-docs
# create a worktree of this repo, with the `gh-pages` branch checked out # create a worktree of this repo, with the `gh-pages` branch checked out
git branch -f gh-pages $REMOTE/gh-pages git branch -f gh-pages $REMOTE/gh-pages
if ! [ -d ./docs/tmp ]; then if ! [ -d ./docs/tmp ]; then
git worktree add docs/tmp gh-pages git worktree add -f docs/tmp gh-pages
fi fi
# update the wortree # update the wortree
(cd docs/tmp && git pull $REMOTE gh-pages) (cd docs/tmp && git pull $REMOTE gh-pages)
# remove all files in the worktree and regenerate the book there # remove all files in the worktree and regenerate the book there
git worktree rm docs/tmp
rm -rf docs/tmp/* rm -rf docs/tmp/*
mdbook build docs mdbook build docs
cp -rp docs/book/* docs/tmp cp -rp docs/book/* docs/tmp