Class: Awestruct::Deploy::GitHubPagesDeploy
- Inherits:
-
Object
- Object
- Awestruct::Deploy::GitHubPagesDeploy
- Defined in:
- lib/awestruct/deploy/github_pages_deploy.rb
Instance Method Summary collapse
-
#initialize(site_config, deploy_config) ⇒ GitHubPagesDeploy
constructor
A new instance of GitHubPagesDeploy.
- #run ⇒ Object
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
#run ⇒ Object
12 13 14 |
# File 'lib/awestruct/deploy/github_pages_deploy.rb', line 12 def run git.status.changed.empty? ? publish_site : (:existing_changes) end |