tag:help.appveyor.com,2012-11-13:/discussions/questions/20735-conditional-configuration-based-on-commit-messageAppVeyor: Discussion 2018-08-25T02:28:44Ztag:help.appveyor.com,2012-11-13:Comment/453140802018-05-21T18:33:47Z2018-05-21T18:33:47ZConditional configuration based on commit message?<div><p>Your assumption is correct, commit filtering affects entire build. Please check this YAML sample on how to make it conditionally for deployment only.</p>
<pre>
<code>install:
- ps: if ($env:APPVEYOR_REPO_COMMIT_MESSAGE.Contains("[deploy]")) {$env:RUN_DEPLOYMENT = "true"}
deploy:
- provider: <provider_name>
<provider_settings>
on:
RUN_DEPLOYMENT: true</code>
</pre>
<p>The same can be done with UI.</p>
<p>More details on conditional deployment <a href="https://www.appveyor.com/docs/deployment/#conditional-deployment">here</a>.</p>
<p>You can use <code>APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED</code> <a href="https://www.appveyor.com/docs/environment-variables/">environment variable</a> if your keyword is after line break in commit message (can happen with multiple squashed commits).</p></div>Ilya Finkelshteyn