Roots Discourse

Deploy with Trellis and theme dependencies


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
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
    chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/hello"

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

- name: Copy production assets
    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/' fatal: []: 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.