Capistrano Deployment Issue

I’m having an issue trying to deploy an app with Capistrano. When I go to deploy, this is all I’m getting:

% cap staging deploy
INFO [f32d6bf4] Running /usr/bin/env mkdir -p /tmp/yoursitename/ on domain.com
INFO [f32d6bf4] Finished in 1.090 seconds with exit status 0 (successful).
INFO Uploading /tmp/yoursitename/git-ssh.sh 100.0%
INFO [57dcde70] Running /usr/bin/env chmod +x /tmp/yoursitename/git-ssh.sh on domain.com
INFO [57dcde70] Finished in 0.100 seconds with exit status 0 (successful).

It doesn’t get an further than this, it just stops. Anyone have this issue or any idea how to resolve it? This is a server with cPanel and WHM with separate users for each site served out of ~/public_html, if that makes any difference.

First guess is there’s some configuration missing like the repo_url: https://github.com/roots/bedrock/blob/master/config/deploy.rb#L2

I suggest posting your deploy.rb file here if you can’t get it working. Setting set :log_level, :debug will also help.

I seem to have figured out my original issue, but now I’m getting the following error:

INFO [2146d9b4] Running /usr/bin/env git archive staging | tar -x -C /home/user/deployments/efs/staging/releases/20140709142821 on domain.com
DEBUG [2146d9b4] Command: cd /home/user/deployments/efs/staging/repo && ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/home/user/tmp/efs/git-ssh.sh /usr/bin/env git archive staging | tar -x -C /home/user/deployments/efs/staging/releases/20140709142821 )
DEBUG [2146d9b4] stdin: is not a tty
DEBUG [2146d9b4] fatal: Not a valid object name
DEBUG [2146d9b4] tar:
DEBUG [2146d9b4] This does not look like a tar archive
DEBUG [2146d9b4]
DEBUG [2146d9b4] tar:
DEBUG [2146d9b4] Exiting with failure status due to previous errors

Looks like it’s failing on git archive staging which likely means that the staging branch doesn’t exist in the remote repo you’ve specified.

I see that now.

Now it seems like the CSS isn’t being pushed with the deploy. Does Grunt need to be installed on the server to run at the time of deployment? I’ve got Composer running on deploy already.

So my repo didn’t have the CSS file in it, I added it and now its pushing up. But the theme is looking for main.min.css and the only CSS file being uploaded is main.css. How do I make it minify the css when pushing it up? I see I can run grunt build and have it minify the CSS and add that to the repo, but is there a better method of doing that?

You could use this https://github.com/roots/capistrano-grunt and have it run on the server. And yeah, it requires Node/Grunt installed.

1 Like