https://github.com/kikyous/mina-laravel
mina-laravel 提供 laravel:build_assets 这个 task 来智能 build 静态文件 (当静态文件没有更新时跳过)
mina-laravel is a gem that adds many tasks to aid in the deployment of laravel applications using Mina.
gem install mina-laravel
After installation, create a file in the root directory of your project called Minafile
.
Note: Mina uses the command mina init
to create a config file at config/deploy.rb
, but laravel use the Config
directory to hold configurations.
To avoid problems we recommend using Minafile
instead of config/deploy.rb
Minafile
sample:
require 'mina/git'
require 'mina-laravel'
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
# branch - Branch name to deploy. (needed by mina/git)
set :user, 'deploy'
set :domain, 'antesky.com'
set :deploy_to, '/home/deploy/www/App'
set :repository, '[email protected]:someone/App.git'
set :branch, 'master'
set :shared_paths, ['.env', 'storage', 'vendor', 'node_modules', 'public/uploads']
desc "Deploys the current version to the server."
task :deploy => :environment do
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
queue 'composer install'
queue 'php artisan migrate --force'
invoke :'laravel:build_assets'
invoke :'deploy:cleanup'
to :launch do
queue 'composer dumpautoload'
queue 'php artisan optimize'
end
end
end
mina setup
More at http://nadarei.co/mina/directory_structure.html
mina deploy
More at http://nadarei.co/mina/deploying.html
mina log
Run
mina -T
To list all tasks.
Copyright (c) 2015 kikyous.