From aac3dd08b03d01f6a61e8947f9711453323c85b2 Mon Sep 17 00:00:00 2001 From: David Danzilio Date: Tue, 5 Jul 2016 15:51:39 -0400 Subject: [PATCH] Adding documentation for the gh_pages task --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ada44b..37acad8 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ Here are a few other good resources for getting started with documentation: Rake Tasks ----- -This module is also available as a Gem and makes two rake tasks (`strings:generate` and `strings:serve`) available in `puppet-strings/rake_tasks`. To add this to your module's CI workflow, be sure to add this module to your `Gemfile`: +This module is also available as a Gem and makes three rake tasks (`strings:generate`, `strings:serve`, and `strings:gh_pages`) available in `puppet-strings/rake_tasks`. To add this to your module's CI workflow, be sure to add this module to your `Gemfile`: In addition to generating the usual 'doc' directory of HTML documentation, the `strings:generate` rake task will also drop a strings.json file containing a JSON representation of the module into the directory the rake task was run from. @@ -219,6 +219,15 @@ PuppetStrings::RakeTasks::Generate.new(:documentation) do |task| end ``` +The `strings:gh_pages` task will generate your Strings documentation to be made available via [GitHub Pages](https://pages.github.com/). It will: + + 1. Create a `doc` directory in the root of your project + 2. Check out the `gh-pages` branch of the current repository in the `doc` directory (it will create a branch if one does not already exist) + 3. Generate strings documentation using the `strings:generate` task + 4. Commit the changes and push them to the `gh-pages` branch **with the `-f` flag** + +This task aims to keep the `gh-pages` branch up to date with the current code and uses the `-f` flag when pushing to the `gh-pages` branch. Please keep this in mind as it **will be destructive** if not used properly. + Developing and Contributing -----