diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-09-21 18:54:54 -0500 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-09-21 18:54:54 -0500 |
commit | a5d55fe80f4f248b3b76535e557123b3e5e5322b (patch) | |
tree | 59bca99d6f72cd642b642578a526febe9cfd2710 /Rakefile | |
parent | 5b2b0c508bec91b3507d53544eec19c9c43ebc27 (diff) | |
download | my_new_personal_website-a5d55fe80f4f248b3b76535e557123b3e5e5322b.tar.xz my_new_personal_website-a5d55fe80f4f248b3b76535e557123b3e5e5322b.zip |
Fixed issue where dotfiles were not being copied to _deploy for github pages deployments
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -215,6 +215,18 @@ task :copydot do end end +desc "copy dot files for Github Pages deployment" +task :copydot_deploy do + exclusions = [".", "..", ".DS_Store"] + Dir["#{public_dir}/**/.*"].each do |file| + if !File.directory?(file) && !exclusions.include?(File.basename(file)) + cp(file, file.gsub(/#{public_dir}/, "#{deploy_dir}")); + end + end + puts "\n## copying #{public_dir} to #{deploy_dir}" +end + + desc "Deploy website via rsync" task :rsync do puts "## Deploying website via Rsync" @@ -225,8 +237,7 @@ desc "deploy public directory to github pages" multitask :push do puts "## Deploying branch to Github Pages " (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } - system "cp -R #{public_dir}/* #{deploy_dir}" - puts "\n## copying #{public_dir} to #{deploy_dir}" + Rake::Task[:copydot_deploy].execute cd "#{deploy_dir}" do system "git add ." system "git add -u" |