Class: Awestruct::Deploy::GitHubPagesDeploy

Inherits:
Object
  • Object
show all
Defined in:
lib/awestruct/deploy/github_pages_deploy.rb

Instance Method Summary collapse

Constructor Details

#initialize(site_config, deploy_config) ⇒ GitHubPagesDeploy

Returns a new instance of GitHubPagesDeploy.



7
8
9
10
# File 'lib/awestruct/deploy/github_pages_deploy.rb', line 7

def initialize( site_config, deploy_config )
  @site_path = site_config.output_dir
  @branch    = deploy_config[ 'branch' ] || 'gh-pages'
end

Instance Method Details

#runObject



12
13
14
# File 'lib/awestruct/deploy/github_pages_deploy.rb', line 12

def run
  git.status.changed.empty? ? publish_site : message_for(:existing_changes)
end