Deploying with Dandelion

I’m still trying to find the right workflow for deploying changes to WordPress themes and plugins. So far FTP has been the go-to solution, but manually uploading files sucks.
My latest experiment has been Dandelion, a Ruby gem that can upload to FTP, SFTP, and even Amazon S3, but does the file uploading for you. It even manages file revisions and only uploads the files that have changed since you last pushed. You can check out the documentation here:

Once you install the gem, just create a dandelion.yml file in the root of your directory and add the details about your server. Then add dandelion.yml to your .gitignore file to make sure this info doesn’t get committed and pushed anywhere.

Then you have a few commands to play with. Try dandelion status to check the current status of the code on your server, and then run dandelion deploy to actually upload your changes.

So far this is much better than manually uploading files. If you use something better, let me know in the comments.

This Post Has 3 Comments

  1. We use at Big Swing because it let’s everyone manage deploys without having to ssh into a central server, and it let’s us do some other cool things like auto deployments, calling webhooks, and running commands on on the server right after the deploy finishes.

  2. Tried to use dandelion deploy for s3, but there’s little documentation for that s3 case.

    From the docs I believe all I need is this in the dandelion.yml:

    adapter: s3
    bucket_name: xxx-xxx-xxx-xxx
    path: .

    %> dandelion deploy
    Connecting to s3://@xxx-xxx-xxx-xxx/.
    Digest::Digest is deprecated; use Digest
    Remote revision: —
    Deploying revision: d02e3f7004d9096f4f98ad651720d9998d2a8030
    Digest::Digest is deprecated; use Digest
    Deploying changes…
    Digest::Digest is deprecated; use Digest
    Writing file:
    Digest::Digest is deprecated; use Digest
    /usr/local/lib/ruby/gems/2.1.0/gems/aws-s3-0.6.3/lib/aws/s3/error.rb:38:in `raise’: The specified bucket does not exist (AWS::S3::NoSuchBucket)
    from /usr/local/lib/ruby/gems/2.1.0/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:72:in `request’
    from /usr/local/lib/ruby/gems/2.1.0/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:88:in `get’
    from /usr/local/lib/ruby/gems/2.1.0/gems/aws-s3-0.6.3/lib/aws/s3/acl.rb:565:in `block in acl’
    from /usr/local/lib/ruby/gems/2.1.0/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:168:in `respond_with’

    Not user exactly what format it wants the bucket in.

    1. I just did a quick test and was able to successfully push code to a bucket in S3. I used underscores in my bucket name. Here’s my full dandelion.yml:
      adapter: s3
      access_key_id: ********
      secret_access_key: ********
      bucket_name: ssbean_dandelion_test

      This worked fine. I got all the same Digest warnings, but the content pushed to my bucket without a problem. You might also check to make sure the user you’ve created has the right permissions to access the bucket you’ve listed in the config. Also, make sure the bucket is created first–I don’t think Dandelion can create the bucket for you.

Leave a Reply

Close Menu