al-quran.reflectslight.io/Rakefile.rb
0x1eef 359cba7c39 add Tasks::Deploy::Remote
add a task for deploying the website to a remote - using rsync.
2022-11-02 13:54:21 -03:00

36 lines
605 B
Ruby

# frozen_string_literal: true
require "bundler/setup"
require_relative "lib/tasks"
include Tasks
namespace :nanoc do
task :compile do
sh "nanoc co"
end
end
task build: "nanoc:compile"
namespace :deploy do
task local: ["nanoc:compile"] do
Deploy::Local.call
end
task remote: ["nanoc:compile"] do
require "dotenv"
Dotenv.load
Deploy::Remote.call
end
end
namespace :linter do
task :ruby do
sh "bundle exec rubocop lib/ src/"
end
task :typescript do
sh "npm run eslint"
end
end
task lint: ["linter:ruby", "linter:typescript"]
task default: "deploy:local"