Body: <p>So I have the following in my Composer file:</p>
  
  <pre><code>  "scripts": {
      "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
      ],
      "post-create-project-cmd": [
        "@php craft setup/welcome"
      ],
      "post-update-cmd": [
        "@php craft migrate/all",
        "@php craft project-config/sync",
        "@php craft clear-caches/compiled-templates",
        "@php craft clear-caches/cp-resources",
        "@php craft clear-caches/data",
        "@php craft clear-caches/seomatic-frontendtemplate-caches",
        "@php craft clear-caches/seomatic-metabundle-caches",
        "@php craft clear-caches/seomatic-sitemap-caches",
        "@php craft clear-caches/temp-files",
        "@php craft clear-caches/template-caches"
      ],
      "post-install-cmd": [
        "@php craft migrate/all",
        "@php craft project-config/sync",
        "@php craft clear-caches/compiled-templates",
        "@php craft clear-caches/cp-resources",
        "@php craft clear-caches/data",
        "@php craft clear-caches/seomatic-frontendtemplate-caches",
        "@php craft clear-caches/seomatic-metabundle-caches",
        "@php craft clear-caches/seomatic-sitemap-caches",
        "@php craft clear-caches/temp-files",
        "@php craft clear-caches/template-caches"
      ]
    }
  </code></pre>
  
  <p>and on my deployment (deployHQ) I have the following SSH command:</p>
  
  <pre><code>cd %path% 
  composer install
  </code></pre>
  
  <p>However, sync changes (project-config/sync) doesn't take effect and each time I have to manually click the button.
  Any ideas what I am missing in the process?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-16T00:40:18.663Z
Comments.Text: Is there anything in DeployHQ's deployment report/log? Can you see it successfully running the sync command?
Comments.UserDisplayName: Alex Roper
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-16T14:58:14.383Z
Comments.Text: Only log I get back from DeployHQ is this;
  Assume it won't log these commands as they are via the composer script?
Comments.UserDisplayName: Terry Upton
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-16T15:11:46.217Z
Comments.Text: Run these commands when I manually run composer install via SSH. 
  I have just updated composer, so I wonder if that has resolved this.
  I will test this out on Monday.
Comments.UserDisplayName: Terry Upton
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-03T09:43:47.557Z
Comments.Text: @TerryUpton: did you get this solved?
Comments.UserDisplayName: Matthias Redl-Mann
Tags: <craft3><deployment><cli>
Title: Auto trigger craft project-config/sync on deployment
ThreadText: # Auto trigger craft project-config/sync on deployment
  
  (Asked by: username_0 on 2019-03-15)
  
  So I have the following in my Composer file:
  
  ```
    "scripts": {
      "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
      ],
      "post-create-project-cmd": [
        "@php craft setup/welcome"
      ],
      "post-update-cmd": [
        "@php craft migrate/all",
        "@php craft project-config/sync",
        "@php craft clear-caches/compiled-templates",
        "@php craft clear-caches/cp-resources",
        "@php craft clear-caches/data",
        "@php craft clear-caches/seomatic-frontendtemplate-caches",
        "@php craft clear-caches/seomatic-metabundle-caches",
        "@php craft clear-caches/seomatic-sitemap-caches",
        "@php craft clear-caches/temp-files",
        "@php craft clear-caches/template-caches"
      ],
      "post-install-cmd": [
        "@php craft migrate/all",
        "@php craft project-config/sync",
        "@php craft clear-caches/compiled-templates",
        "@php craft clear-caches/cp-resources",
        "@php craft clear-caches/data",
        "@php craft clear-caches/seomatic-frontendtemplate-caches",
        "@php craft clear-caches/seomatic-metabundle-caches",
        "@php craft clear-caches/seomatic-sitemap-caches",
        "@php craft clear-caches/temp-files",
        "@php craft clear-caches/template-caches"
      ]
    }
  
  ```
  
  and on my deployment (deployHQ) I have the following SSH command:
  
  ```
  cd %path% 
  composer install
  
  ```
  
  However, sync changes (project-config/sync) doesn't take effect and each time I have to manually click the button.
  Any ideas what I am missing in the process?
  
  **Tags:** craft3, deployment, cli
  
  > **Comments:**
  > **username_1**: Is there anything in DeployHQ's deployment report/log? Can you see it successfully running the sync command?  
  > **username_0**: Only log I get back from DeployHQ is this; Assume it won't log these commands as they are via the composer script?  
  > **username_0**: Run these commands when I manually run composer install via SSH.  I have just updated composer, so I wonder if that has resolved this. I will test this out on Monday.  
  > **username_2**: @username_0: did you get this solved?  
  
  ---
  
  ## 0 answers
  
  