File tree 2 files changed +66
-60
lines changed 2 files changed +66
-60
lines changed Original file line number Diff line number Diff line change @@ -519,14 +519,20 @@ multitask :push do
519
519
( Dir [ "#{ deploy_dir } /*" ] ) . each { |f | rm_rf ( f ) }
520
520
Rake ::Task [ :copydot ] . invoke ( public_dir , deploy_dir )
521
521
puts "\n ## copying #{ public_dir } to #{ deploy_dir } "
522
+
523
+ rm_rf deploy_dir
524
+ mkdir deploy_dir
522
525
cp_r "#{ public_dir } /." , deploy_dir
523
526
cd "#{ deploy_dir } " do
527
+ system "git init"
528
+ system "git branch -m gh-pages"
529
+ system "git remote add origin #{ repo_url } "
524
530
system "git add --all ."
525
531
puts "\n ## Commiting: Site updated at #{ Time . now . utc } "
526
532
message = "Site updated at #{ Time . now . utc } "
527
533
system "git commit -anm \" #{ message } \" "
528
534
puts "\n ## Pushing generated #{ deploy_dir } website"
529
- system "git push origin HEAD: #{ deploy_branch } --force"
535
+ system "git push origin #{ deploy_branch } --force"
530
536
puts "\n ## Github Pages deploy complete"
531
537
end
532
538
end
You can’t perform that action at this time.
0 commit comments