diff --git a/README.md b/README.md index e366d6a..a2ff3e8 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/bin/attentive b/bin/attentive index 76bccf8..f82aa4e 100755 --- a/bin/attentive +++ b/bin/attentive @@ -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