Skip to content

Commit b4b3fd3

Browse files
committed
Update docs command
1 parent 28e18a0 commit b4b3fd3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/docs/docs.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env sh
22

3+
if [[ `git status --porcelain` ]]; then
4+
echo "Working directory must be clean"
5+
exit 1
6+
fi
37
echo Removing current docs folder...
48
rm -rf docs
59
echo Building new docs...
@@ -12,3 +16,12 @@ touch docs/.nojekyll
1216
echo Adding CNAME file...
1317
echo jsonapy.pycolore.fr > docs/CNAME
1418
echo Done.
19+
echo Switching to gh-pages branch...
20+
git add docs
21+
git stash
22+
git checkout gh-pages
23+
git stash pop --quiet
24+
git checkout --theirs .
25+
git add docs
26+
git stash drop
27+
echo Ready to commit.

0 commit comments

Comments
 (0)