Persist data between steps with volumes



I’ve read the docs on using volumes in the codeship-services.yml file. I’m running a gulp task in one of my steps that creates a build directory that needs to persist to the next steps. When I run jet steps, and then run docker exec CID ls -al I see the build directory in the container on that first build step, but it disappears once the next step starts. I’m using the following bit in my services file:

    image: buildImg
    dockerfile: Dockerfile
    encrypted_args_file: build_args.encrypted
  encrypted_env_file: .env/env-dev.encrypted
  cached: true
  default_cache_branch: "dev"
    - ./tmp/site:/site

In the following step I try to reference that build directory but get an error that it can’t be found. Here are the first two steps:

# Build the site
- name: Build
  tag: ^(master|staging|dev)$
  service: dev
  command: ./node_modules/.bin/gulp build

# Deploy Dev
- name: Deploy Dev
  tag: dev
  service: dev
  command: ./.bin/

I’ve tried changing the command so that it includes /site or /tmp/site in the path, but get an error on the first step that node_modules can’t be found. What am I missing here?