mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-12-23 16:08:55 -05:00
Fixed issue where dotfiles were not being copied to _deploy for github pages deployments
This commit is contained in:
parent
5b2b0c508b
commit
a5d55fe80f
15
Rakefile
15
Rakefile
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user