Your script works for me in Windows. I have also used a 3 line batch file:
echo Deploying files…
xcopy %DEPLOYMENT_SOURCE%\build %DEPLOYMENT_TARGET% /Y /S
But this requires you to include the /build folder in your repo, and to do “yarn run build” on your machine first.