Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
alexwebgr opened this issue Sep 10, 2017 · 2 comments
Closed

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

alexwebgr opened this issue Sep 10, 2017 · 2 comments

Comments

@alexwebgr
Copy link
Contributor

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
Copy link
Member

d4be4st commented Sep 11, 2017

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
Copy link
Contributor Author

It works !
I also added a new recipe in the cookbook #563.

thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants