Roots Discourse

Deploy is copying root directory to release folder instead of site directory


#1

I’m attempting to deploy a set up with multiple sites to a staging server (we’ll call them site1 and site2). However, I’m running into an issue where site1 deploys correctly but site2 does not. site2 seems to be copying the root directory of the project to the release folder, rather than the its directory.

For example, if I’m SSHed into the server and navigate to /srv/www/site1.com/current and ls the files, I see the bedrock files (i.e. web/, wp-cli.yml, composer.json, etc). If I navigate to /srv/www/site2.com/{release} and ls the files, I see the following 3 directories site1.com/, site2.com/, and trellis/.

I only figured this out because the deploy for site2 fails on trying to rsync the built theme to the server (fails because it’s trying to copy to /srv/www/site2.com/{release}/web/app/themes/site2theme, which doesn’t exist).

This is my group_vars/staging/wordpress_sites.yml file:

wordpress_sites:
  site1.com:
    site_hosts:
      - canonical: site1.example.com
    local_path: ../site1.com
    repo: git@github.com:example/wordpress-sites.git
    repo_subtree_path: site1.com
    branch: master
    multisite:
      enabled: false
    ssl:
      enabled: false
      provider: letsencrypt
    cache:
      enabled: true
      duration: 7d
      skip_cache_uri: /wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml
      skip_cache_cookie: comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in
  site2.com:
    site_hosts:
      - canonical: site2.example.com
    local_path: ../site2.com
    repo: git@github.com:example/wordpress-sites.git
    repo_subtree_h: site2.com
    branch: master
    multisite:
      enabled: false
    ssl:
      enabled: false
      provider: letsencrypt
    cache:
      enabled: true
      duration: 7d
      skip_cache_uri: /wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml
      skip_cache_cookie: comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in

As far as I can tell that is correct. And the repo subtree paths are correct as well. I did have the wrong repo in there at the beginning on accident (copied over incorrectly from a previous project), so I’m not sure if that has anything to do with it; everything should be correct now.

Any help or ideas would be greatly appreciated!


#2

Is this a typo in your discourse post? This key / value should be:

repo_subtree_path: site2.com