mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
Set flag in preview mode and re-generate files before deployment if necessary
This commit is contained in:
7
Rakefile
7
Rakefile
@ -200,6 +200,13 @@ end
|
||||
|
||||
desc "Default deploy task"
|
||||
task :deploy do
|
||||
# Check if preview posts exist, which should not be published
|
||||
if File.exists?(".preview-mode")
|
||||
puts "## Found posts in preview mode, regenerating files ..."
|
||||
File.delete(".preview-mode")
|
||||
Rake::Task[:generate].execute
|
||||
end
|
||||
|
||||
Rake::Task[:copydot].invoke(source_dir, public_dir)
|
||||
Rake::Task["#{deploy_default}"].execute
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user