azure - SvelteKit 应用程序未在 Azure Web Static App 中上传

标签 azure github azure-web-app-service sveltekit azure-static-web-app

我正在尝试在 Azure 静态 Web 应用程序中上传我的应用程序。我在本地测试了我的 SvelteKit 应用程序,它工作正常。 首先,我使用 VS Code 在我的 GitHub 帐户中提交了我的项目。 然后我转到 Azure 门户,然后单击添加新的静态 Web 应用程序,这是我的以下设置: Azure Portal Settings

然后在 GitHub 中,我看到以下错误: GitHub Errors

Could not detect any platform in the source directory.
Error: Could not detect the language from repo.


---End of Oryx build logs---
Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support.
Finished building app with Oryx
[WARNING] Api Directory Location: 'api' could not be found. Azure Functions will not be created.
Failed to find a default file in the app artifacts folder (/). Valid default files: index.html,Index.html.
If your application contains purely static content, please verify that the variable 'app_location' in your workflow file points to the root of your application.
If your application requires build steps, please validate that a default file exists in the build output directory.


For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting

我注意到它提示 html 文件的名称,但是,如果我更改 HTML 文件的名称,应用程序将无法工作。

不知道我做错了什么。我已尝试更改每个可能的文件夹的应用程序位置,但仍然不起作用。

希望有人能帮助我。

最佳答案

  • 我已使用 GitHub 存储库在 azure 门户中部署了一个静态 Web 应用程序。通过使用以下步骤

  • 在 GitHub 中检查一次存储库是否存在

  • 首先,您必须将代码部署到 GitHub 存储库,如下所示

enter image description here

  • 打开 Azure 门户并搜索静态 Web 应用

enter image description here

  • 点击创建

enter image description here

  • 之后,我们必须填写订阅 ID资源、静态网络应用名称

enter image description here

enter image description here

  • 点击“创建”后,我们会找到下面的内容并选择创建

enter image description here

  • 成功部署后,在 Azure 门户中看到如下内容

enter image description here

关于azure - SvelteKit 应用程序未在 Azure Web Static App 中上传,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74455234/

相关文章:

Github直接push到main

GitHub - 无法找到其他 GitHub 公共(public)帐户以添加为协作者

azure - 从 Azure 网站到 IP 限制的 FTP 进行通信

asp.net - Azure Web 服务管理您的帐户链接出现错误 : 26 - Error Locating Server/Instance Specified)

Azure 数据工厂 (v2) 中缺少 JSON header

azure - 我应该将 AzureWebApp 任务指向什么路径?

git - 克隆分支并将其推送到私有(private)仓库中

azure - 我的 Azure Web 应用程序可以访问虚拟网络的内部 DNS 吗?

azure - ARM 模板资源中的 if 条件

T sql 查询的 Azure SQL 警报