Class: Bard::GithubPages
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Bard::GithubPages
- Defined in:
- lib/bard/github_pages.rb
Instance Method Summary collapse
Instance Method Details
#deploy(server) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bard/github_pages.rb', line 7 def deploy server @sha = Git.sha_of(Git.current_branch) @build_dir = "tmp/github-build-#{@sha}" @branch = "gh-pages" @domain = server.ping.first @domain = URI.parse(@domain).hostname if @domain puts "Starting deployment to GitHub Pages..." build_site tree_sha = create_tree_from_build new_commit = create_commit(tree_sha) commit_and_push new_commit end |