some updates
This commit is contained in:
parent
f0afac6cc5
commit
b73400b0ac
@ -88,6 +88,31 @@ class Attentive::CLI < Thor
|
||||
File.open(target, 'wb') { |fh| response.last.each { |part| fh.print part } }
|
||||
end
|
||||
end
|
||||
|
||||
desc "gh-pages", "Commit the static site to the associated GitHub pages account"
|
||||
def gh_pages
|
||||
static
|
||||
|
||||
target = "/tmp/attentive-#{Time.now.to_i}"
|
||||
|
||||
system %{cp -Rpv _site #{target}}
|
||||
|
||||
system %{git checkout gh-pages}
|
||||
if $?.exitstatus == 1
|
||||
puts "Creating gh-pages branch..."
|
||||
system %{git add . && git commit -a -m "pre-gh pages creation"}
|
||||
|
||||
system %{git symbolic-ref HEAD refs/heads/gh-pages}
|
||||
system %{rm .git/index}
|
||||
system %{git clean -fdx}
|
||||
|
||||
system %{git checkout gh-pages}
|
||||
end
|
||||
|
||||
system %{cp -Rpv #{target}/* .}
|
||||
system %{git add . && git commit -a -m "Update published site"}
|
||||
system %{git checkout master}
|
||||
end
|
||||
end
|
||||
|
||||
Attentive::CLI.start
|
||||
|
1
skel/.gitignore
vendored
1
skel/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.sass-cache/
|
||||
.DS_Store
|
||||
|
||||
|
0
views/_footer.haml
Normal file
0
views/_footer.haml
Normal file
Loading…
Reference in New Issue
Block a user