Adam Johnson Adam Johnson - 1 year ago 81
Javascript Question

Deploy folder in CWD using Shipit JS

I'm trying to use shipit to deploy a

folder which is already built on the file system (using gulp), but not checked out in git, to a remote.

However, rather than rsync'ing the existing directory to the remote, it tries to clone the repo in the workspace where my
folder doesn't exist and fails.

Omitting the repositoryUrl option also causes this to fail.

Is there any way to achieve this using shipit? Or is it against the concept of shipit, and my
folder should be built using their plugins?

My flow is:

Build from
(Gulp) -> Test -> Deploy
to remote (shipit)

My shipit config:

workspace: '/tmp/.shipit'
dirToCopy: './dest/'
servers: ''
deployTo: '/path/to/ship/to/'

Answer Source

The solution was to be more specific with the deploy tasks which got ran, and specify the workspace as the current working directory like so:

  workspace: './'
  dirToCopy: 'dest'

Only running the following tasks:

  • deploy:init
  • deploy:update
  • deploy:publish
  • deploy:clean
  • deploy:finish

I.e. removing the deploy:fetch task from the default task set.

This was made easier to achieve using the Shipit Captain module to integrate it with gulp.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download