Skip to content

Instantly share code, notes, and snippets.

@alyssaq
Last active December 28, 2015 11:59
Show Gist options
  • Save alyssaq/7497064 to your computer and use it in GitHub Desktop.
Save alyssaq/7497064 to your computer and use it in GitHub Desktop.
Publish a folder to gh-pages

#Publish a folder to gh-pages

Scenario: You have a local target folder app that you wish to pubish to gh-pages

Add the target folder to to your .gitignore repository.
Clone the repository to the target folder app, delete the contents and add your files to be published

$ git clone https://github.com/alyssa/polymer app
$ cd app
$ git checkout --orphan gh-pages
$ git rm -rf
$ git add index.html
$ git commit -am "publish to gh-pages"
$ git push origin gh-pages
$ cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment