3 releases

Uses old Rust 2015

0.1.2 May 11, 2016
0.1.1 Apr 24, 2016
0.1.0 Apr 24, 2016

49 downloads per month


270 lines

ghp-rs Crates.io Travis Status Build status apache-license mit-license

Easily import a folder to your gh-pages branch!


I wrote this tool to help people who want to host documentation or anything on a gh-pages branch. This was heavily influenced by ghp-import and has a similar implementation.


The documentation can be found here. The documentation is powered by cargo doc and ghp-rs. Check out the .travis.yml and the travis setup for an example of how to use ghp-rs with rustdoc.


Via Cargo

cargo install ghp

Via Binary

Coming Soon!

Via Git

git clone https://github.com/LucioFranco/ghp-rs
cargo build --release
export PATH="$PATH:/path/to/ghp-rs/target/release/"

Command Line Usage


# Example

ghp build # move content of build folder to gh-pages branch

ghp --branch website build # will move the contents of the build folder to the website branch

ghp --message "This is a git commit message" build

Programatic Usage


ghp = "0.1"
extern crate ghp;
use ghp::import_dir;

import_dir("build", "gh-pages", "commit message").unwrap();

Travis Setup

For this you will need to have a GH_TOKEN variable with your github personal token. Read more here.

after_success: |
  [ $TRAVIS_RUST_VERSION = stable ] &&
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&  
  ghp target/doc &&
  git config user.name "Travis Documentation" &&
  git config user.email "name@example.com" &&
  git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages


Licensed under either of


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.