As we start to move off of Forge I still want the automation to take place after all tests pass.

In Codeship or Locally I just follow some instructions from here


Setup Envoy globally as noted.

Run envoy init

And then I pasted this into my Envoy.blade.php

@servers(['dev' => 'behat_dev'])

@task('deploy_dev', ['on' => 'dev'])
    cd /home/forge/foo-dev
    git pull origin dev
    composer config -g sometoken
    composer install
    composer dump-autoload
    php artisan dump-autoload
    php artisan migrate
    php artisan migrate:refresh --seed
    ~/node_modules/bower/bin/bower install
    npm install
    php artisan queue:restart

Setup you .ssh config

The behat_dev is a shortcut to the server I made in my ~/.ssh/config

Host foo_dev
    User forge

So now locally I can run

envoy run deploy_dev


Setup the server

sudo composer global require "laravel/envoy=~1.0"

Edit your ~/.ssh/config

Host behat_dev
  Hostname localhost
  User forge

Make sure to put your key into authorized keys

cd .ssh
cat >> authorized_keys

Try logging in

ssh behat_dev

Then setup codeship

Under the Deployment settings use script

ssh forge@ 'cd ~/foo-dev && envoy run deploy_dev'

Make sure you codeship public key is also on the destination server