No commit activity in last 3 years
No release in over 3 years
A Rake task to publish documentation like yard or mkdocs to GitHub Pages. The rake task copies all files from the src_dir and pushes them to the GitHub repository and branch identified by repo_url and branch_name. The contents of the branch are completely overwritten by the contents of src_dir.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 0.8
~> 2.0
~> 12.3
~> 3.8
~> 0.70
~> 0.16
~> 0.9
~> 0.9
 Project Readme

Publish Documentation to GitHub Pages

Gem Version License: MIT Build Status Documentation

The github_pages_rake_tasks gem creates a rake task that pushes files from a local documentation directory to a remote Git repository branch.

By default, the rake task github-pages:publish is created which pushes the doc directory within the local copy of a repository to the same repository's gh-pages branch. The contents of the branch are completely replaced by the contents of the documentation directory.

This task is useful for publishing rdoc or yard documentation using GitHub Pages.

Installation

Add this line to your application's Gemfile:

gem 'github_pages_rake_tasks'

And then execute:

$ bundle

Or install it directly with the gem command line:

$ gem install github_pages_rake_tasks

Usage

Add the github-pages:publish task to Rake by adding the following lines in your Rakefile:

require 'github_pages_rake_tasks'
GitHubPagesRakeTasks::PublishTask.new

You can also configure the task by providing a block during initialization:

require 'github_pages_rake_tasks'
GitHubPagesRakeTasks::PublishTask.new do |task|
  task.doc_dir = 'documentation'
  task.repo_url = 'https://github.com/jcouball/github_pages_documentation'
  task.branch_name = 'master'
end

See the full usage documentation for more details.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jcouball/github_pages_rake_tasks.

Copyright and License

Copyright © 2019 James Couball. Free use of this software is granted under the terms of the MIT License. See LICENSE for details.