Yarn run build:production doesn't create dist folder on production

I have Sage 9 beta 2 based theme and trellis running. I’m using build-before.yml to build my theme on production:

 - name: Run yarn install
    command: yarn install
    connection: local
    args:
      chdir: "{{ project.local_path }}/web/app/themes/kateoleshova"

 - name: Install Composer dependencies
   command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts
   args:
    chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/kateoleshova"

- name: Compile assets for production
  command: yarn run build:production
  connection: local
  args:
   chdir: "{{ project.local_path }}/web/app/themes/kateoleshova"

On deployment everything goes smoothly (no errors in terminal), but, after deploy, dist folder is missing on production

My bet, never uncommented and changed this bit:

 - name: Copy project local files
   synchronize:
     src: "{{ project.local_path }}/web/app/themes/sage/dist"
     dest: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
     group: no
     owner: no
     rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r
2 Likes