tag:help.appveyor.com,2012-11-13:/discussions/problems/34341-pushing-gh-pages-fails-every-other-attemptAppVeyor: Discussion 2023-06-28T21:02:55Ztag:help.appveyor.com,2012-11-13:Comment/587215722023-04-24T18:26:43Z2023-04-24T18:26:43ZPushing gh-pages fails every other attempt<div><p>It's because the last git push command writes some output to <code>StdErr</code> which is treated as an exception by built-in PowerShell host in build agent.</p>
<p>Try moving that command out of that PS command into a separate, like:</p>
<pre>
<code>before_deploy:
- ps: >-
$env:PACKAGE_VERSION=(Get-Content MUSHclient\AardwolfPackageChanges.txt)[2].split()[0]
...
git add index.html 2>&1 | write-host
git add unzip_upgrading.html 2>&1 | write-host
git commit -q -m "automatic rev update $env:PACKAGE_VERSION"
- git push -q origin gh-pages</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/587215722023-04-28T17:23:52Z2023-04-28T17:23:52ZPushing gh-pages fails every other attempt<div><p>Any idea why it only started happening recently? I've been using the same config for years.</p></div>patcherton.fixesthingstag:help.appveyor.com,2012-11-13:Comment/587215722023-04-28T17:25:24Z2023-04-28T17:25:24ZPushing gh-pages fails every other attempt<div><p>My guess would be Git upgraded in the image multiple times. Could be changes in output of recent Git versions.</p></div>Feodor Fitsner