mina-deploy / mina

Blazing fast deployer and server automation tool
https://rubygems.org/gems/mina
Other
4.35k stars 491 forks source link

Is it possible to deploy static websites with mina ? #562

Closed alexwebgr closed 6 years ago

alexwebgr commented 6 years ago

hi guys

what an amazing tool ! The missing piece of the puzzle for a framework like rails. i am actually so impressed i was wondering if i could use it to deploy plain HTML, CSS websites.

i installed gem install mina on an empty directory and run mina init which created the deploy.rb file i configured the basic settings like deploy_to, user, repository and so on but when i run mina setup nothing happens and when i run mina deploy i get

Don't know how to build task 'deploy:cleanup'

and if comment that out i get

TypeError: no implicit conversion of nil into String /var/www/static-mina/deploy.rb:50:in `block in <top (required)>'

desc "Deploys the current version to the server." task :deploy do

uncomment this line to make sure you pushed your local branch to the remote origin

invoke :'git:ensure_pushed'

deploy do #<- line 50

Put things that will set up an empty directory into a fully set-up

#instance of your project.
invoke :'git:clone'
#invoke :'deploy:cleanup'

end

you can use run :local to run tasks on local machine before of after the deploy scripts

run(:local){ say 'done' }

end

i searched but didn't find something relevant

thanks alex

d4be4st commented 6 years ago

yes you can, but you need different requires.

I assume you removed

require 'mina/bundler`
require 'mina/rails'

from the top of the deploy.rb script and left

require 'mina/git'

you are missing

require 'mina/deploy'

mina/rails contains mina/deploy.

alexwebgr commented 6 years ago

It works ! I also added a new recipe in the cookbook https://github.com/mina-deploy/mina/pull/563.

thanks