Class: GithubPages::Deployer
- Inherits:
-
Object
- Object
- GithubPages::Deployer
- Defined in:
- lib/ghpages_deploy/deployer.rb
Instance Method Summary collapse
- #deploy ⇒ Object
-
#initialize(git, source, destinations) ⇒ Deployer
constructor
A new instance of Deployer.
Constructor Details
#initialize(git, source, destinations) ⇒ Deployer
Returns a new instance of Deployer.
9 10 11 12 13 |
# File 'lib/ghpages_deploy/deployer.rb', line 9 def initialize(git, source, destinations) @git = git @source = source @destinations = destinations end |
Instance Method Details
#deploy ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ghpages_deploy/deployer.rb', line 15 def deploy SiteCompressor.new(@source).compress @destinations.keep_if { |dest| deploy_site_to(dest) } if @destinations.empty? $stderr.puts 'No changes detected, not commiting.' else @git.commit_and_push end end |