Skip to content

Commit 7896850

Browse files
committed
Update site
1 parent 2335d7f commit 7896850

File tree

2 files changed

+66
-60
lines changed

2 files changed

+66
-60
lines changed

_octopress/Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,20 @@ multitask :push do
519519
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
520520
Rake::Task[:copydot].invoke(public_dir, deploy_dir)
521521
puts "\n## copying #{public_dir} to #{deploy_dir}"
522+
523+
rm_rf deploy_dir
524+
mkdir deploy_dir
522525
cp_r "#{public_dir}/.", deploy_dir
523526
cd "#{deploy_dir}" do
527+
system "git init"
528+
system "git branch -m gh-pages"
529+
system "git remote add origin #{repo_url}"
524530
system "git add --all ."
525531
puts "\n## Commiting: Site updated at #{Time.now.utc}"
526532
message = "Site updated at #{Time.now.utc}"
527533
system "git commit -anm \"#{message}\""
528534
puts "\n## Pushing generated #{deploy_dir} website"
529-
system "git push origin HEAD:#{deploy_branch} --force"
535+
system "git push origin #{deploy_branch} --force"
530536
puts "\n## Github Pages deploy complete"
531537
end
532538
end

0 commit comments

Comments
 (0)