add gh-pages option
This commit is contained in:
parent
b73400b0ac
commit
dbc53a08dc
@ -23,6 +23,11 @@ Run the current presentation on another port.
|
||||
|
||||
Generate a static copy of the presentation and dependent files into `_site`.
|
||||
|
||||
`attentive gh-pages`
|
||||
|
||||
Generate a static copy, commit it to the `gh-pages` branch of your site.
|
||||
`gh-pages` gets created if it doesn't exist.
|
||||
|
||||
Edit `presentation.rb` and start adding `.slides` files in `presentation/`. The files are processed in sort order.
|
||||
|
||||
While the presentation is running:
|
||||
|
@ -87,6 +87,8 @@ class Attentive::CLI < Thor
|
||||
FileUtils.mkdir_p(File.dirname(target))
|
||||
File.open(target, 'wb') { |fh| response.last.each { |part| fh.print part } }
|
||||
end
|
||||
|
||||
FileUtils.rm_rf '.sass-cache' if File.directory?('.sass-cache')
|
||||
end
|
||||
|
||||
desc "gh-pages", "Commit the static site to the associated GitHub pages account"
|
||||
@ -109,8 +111,11 @@ class Attentive::CLI < Thor
|
||||
system %{git checkout gh-pages}
|
||||
end
|
||||
|
||||
system %{rm -Rf *}
|
||||
system %{cp -Rpv #{target}/* .}
|
||||
system %{git add . && git commit -a -m "Update published site"}
|
||||
system %{git add .}
|
||||
system %{git add *}
|
||||
system %{git commit -a -m "Update published site"}
|
||||
system %{git checkout master}
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user