Added a snippet to /trellis/deploy-hooks/build-before.yml like @paul_tibbetts recommended. Even though Composer ran successfully, I’m still receiving same error as @Nicolo_Sacchi.
Snippet:
- name: Check for composer.json in sage
stat:
path: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
register: plugin_composer_json
- name: Fail if composer.json not found
fail:
msg: "Unable to find a `composer.json` file in the root of '{{ deploy_helper.new_release_path }}/web/app/plugins/suplifacil'. Make sure the theme has a `composer.json` file in its root."
when: not plugin_composer_json.stat.exists
- name: Install Composer dependencies for Sage
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/sage"
Update:
Managed to have it working just fine by following this thread