Low commit activity in last 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
2023
2024
 Dependencies

Development

~> 3.6
= 0.3.0
~> 0.22
~> 0.9, >= 0.9.28
~> 13.1
~> 3.12
~> 1.58
~> 0.9
 Project Readme

Publish Documentation to GitHub Pages

Gem Version Documentation Change Log Build Status Maintainability Test Coverage

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

An instance of GithubPagesRakeTasks::State is passed to the initialization block (named task in the example above).

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.