Created
November 27, 2011 23:41
-
-
Save alexyoung/1398458 to your computer and use it in GitHub Desktop.
Publish a subdirectory of documentation to a gh-pages branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishdocs: | |
$(eval PARENT_SHA := $(shell git show-ref -s refs/heads/gh-pages)) | |
$(eval DOC_SHA := $(shell git ls-tree -d HEAD docs | awk '{print $$3}')) | |
$(eval COMMIT := $(shell echo "Auto-update docs." | git commit-tree $(DOC_SHA) -p $(PARENT_SHA))) | |
@git update-ref refs/heads/gh-pages $(COMMIT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment