Azure fails when I try to deploy through GitHub

被刻印的时光 ゝ 提交于 2019-12-12 04:30:17

问题


I get this error when I deploy my deploy.sh file to azure. How can I fix this ?

Command: bash deploy.sh
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository\nodejs' to: 'D:\home\site\wwwroot'
Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.
An error has occurred during web site deployment.
Kudu Sync failed
Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51202.2583\bin\Scripts\starter.cmd bash deploy.sh

My website is using NodeJS as taskrunner, but the build scripts fails before it even reaches the build part.

This is the code that fails:

if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
  "$KUDU_SYNC_CMD" -v 50 -f "$DEPLOYMENT_SOURCE/nodejs" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
  exitWithMessageOnError "Kudu Sync failed"
fi

I'm on a mac and the the code that fails was generated by the azure-cli package.


回答1:


The error indicates,

Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.

So please change "$DEPLOYMENT_SOURCE/nodejs" to "$DEPLOYMENT_SOURCE" and redeploy it.

Or you can regenerate the deploy.sh file with the command below in Azure CLI,

azure site deploymentscript --node -t bash


来源:https://stackoverflow.com/questions/40960685/azure-fails-when-i-try-to-deploy-through-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!