Deploy with Trellis and theme dependencies

Hi,

I followed the process for deploying a Trellis project on a Digital Ocean’s droplet and check the files config on the repo. The provision step seems to be good and my project is available online.

I edited the build-before hook file like this :
- name: Install npm dependencies
command: yarn
delegate_to: localhost
args:
chdir: “{{ project_local_path }}/web/app/themes/hello”

- 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/hello"

- name: Compile assets for production
  command: yarn build:production
  delegate_to: localhost
  args:
    chdir: "{{ project_local_path }}/web/app/themes/hello"

- name: Copy production assets
  synchronize:
    src: "{{ project_local_path }}/web/app/themes/hello/dist"
    dest: "{{ deploy_helper.new_release_path }}/web/app/themes/hello"
    group: no
    owner: no
    rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r

When I run the Trellis command for deploying I have this error Unable to change directory before execution: [Errno 2] No such file or directory: '/srv/www/codyfab.dev/releases/20210501230546/web/app/themes/hello' fatal: [159.89.1.146]: FAILED! => {"changed": false} when composer try to install dependencies.

In WordPress admin, the theme has this error Broken theme - hello - stylesheet is missing

I read a lot of topics before posting but I didn’t find solution.

Thanks by advance and sorry for my english :wink:

I was a little tired yesturday : I found a typo in the wordpress_site file :slight_smile:

This topic was automatically closed after 42 days. New replies are no longer allowed.