Skip to content

Commit

Permalink
chore] improve publish docs commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jun 16, 2017
1 parent 88d2ae1 commit 2af9b89
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,33 @@ pre-publish: clean .branch .version deps-project tests-ci build

publish: pre-publish publish-version publish-finished

publish-docs: deps-docs build-docs
init-docs-repo:
@mkdir _book

pre-publish-docs: clean-docs init-docs-repo deps-docs

publish-docs: clean pre-publish-docs build-docs
@echo "[Publishing docs]"
git init _book
cd _book
@make -C _book -f ../Makefile _publish-docs

_publish-docs:
git init .
git commit --allow-empty -m 'update book'
git checkout -b gh-pages
touch .nojekyll
git add .
git commit -am 'update book'
git push [email protected]:reactjs/react-modal gh-pages --force
cd ..

publish-all: publish publish-docs

clean-sources:
@rm -rf lib/* dist/* _book
clean-docs:
@rm -rf _book

clean-coverage:
@rm -rf ./coverage/*

clean-build:
@rm -rf .version .branch lib/*

clean: clean-sources
@rm -rf .version .branch ./coverage/*
clean: clean-build clean-docs clean-coverage

0 comments on commit 2af9b89

Please sign in to comment.