I’ve successfully setup a Kinsta / Bedrock / Trellis environment that deploys code, but I wanted to build theme assets too. I used the Roots Sage example project, and started using the build-before.yml deploy hook, and it fails with this error:
kinsta_staging | FAILED | rc=2 >>
[Errno 2] No such file or directory
Here is the first task that fails:
- name: Install npm dependencies
command: yarn install
delegate_to: localhost
args:
chdir: "{{ project_local_path }}"
Here’s the wordpress_sites.yml:
wordpress_sites:
stg.example.com:
site_hosts:
- canonical: staging-xxxxxxxx.kinsta.cloud
local_path: .. # path targeting local Bedrock site directory (relative to Ansible root)
repo: [email protected]:xxxx/xxxxxxxx.git # replace with your Git repo URL
branch: master
multisite:
enabled: false
ssl:
enabled: false
provider: letsencrypt
cache:
enabled: false
Instead of having Bedrock inside a site directory, I have it as root of the project, and only have trellis as a sub-directory, and it works great for the deployment. I’m only having problems running yarn install on the root directory, because that’s where I keep my package.json.