Reference: http://ricostacruz.com/lidoc/manual/guides/uploading_to_github_pages.html
Created
October 14, 2012 01:43
-
-
Save ramnathv/3886937 to your computer and use it in GitHub Desktop.
Pushing Documentation to Github Pages
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
# ignore built md and html files in the slides directory | |
slides/*.html | |
slides/*.md | |
slides/fig/* | |
slides/figures/* |
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
# Makefile | |
GITHUB_REPO ?= yourname/project | |
# Sends the documentation to gh-pages. | |
docs.deploy: docs | |
cd docs && \ | |
git init . && \ | |
git add . && \ | |
git commit -m "Update documentation."; \ | |
git push "git@github.com:$(GITHUB_REPO).git" master:gh-pages --force && \ | |
rm -rf .git | |
.PHONY: docs.deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this and it works. Basically it works by initializing the deploy directory as a git repository, pushing it to a remote gh-pages branch (by force) and removing the .git directory so that all history is erased.