StaticDeploy
Rake tasks to ease publishing a static website via git to a remote repository (e.g. GitHub pages).
Installation
Add this line to your application's Gemfile:
gem 'static_deploy'
And then execute:
$ bundle
Or install it yourself as:
$ gem install static_deploy
Usage
In Rakefile
add the following:
require 'static_deploy'
ENV['GENERATOR'] = 'jekyll' # => static website generator executable
ENV['COMMAND'] = 'build' # => command for building a project, defaults to 'build'
When deploying inside the current repository, git defaults are used to get username and repository name:
bundle exec rake site:publish
Otherwise, to publish to remote branch in the different repository do:
bundle exec rake site:publish["username/repository"]
As a convenience you may want to add the following rake task to your Rakefile
:
desc 'publish this site'
task :publish do
Rake::Task['site:publish'].invoke("username/repository")
end
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Code of Conduct
Everyone interacting in the StaticDeploy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Copyright
Copyright (c) 2013 Piotr Murach. See LICENSE for further details.