gpt4 book ai didi

node.js - Azure 中的 Angular 工件包含约 43k 个文件

转载 作者:行者123 更新时间:2023-12-03 01:19:23 25 4
gpt4 key购买 nike

因此,我有一个小型 Angular 项目,每次我尝试将其部署到 Azure 时,它​​都会上传约 43k 个文件作为工件。我不擅长部署到 Azure,所以这可能是一个非常愚蠢的问题,但仍然如此。

所以,这是我的 GitHub Actions 工作流程文件

name: Build and deploy Node.js app to Azure Web App - minesweeper

on:
release:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: npm install, build, and test
run: |
npm install
npm run build --prod
working-directory: .

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: .

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: node-app

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'minesweeper'
publish-profile: $
package: ./dist/minesweeper_

A

所以,这里我有一个与我的项目名称匹配的路径:minesweeper_,应用程序名称来自 azure

Here is the GH log

我在这里做错了什么

https://github.com/yan14171/Minesweeper - 这是存储库本身

最佳答案

There are over 10,000 files in this artifact, consider creating an archive before upload to improve the upload performance.

根据 documentation :

  • 在上传过程中,每个文件都会使用单独的 HTTPS 连接以 4MB block 的形式同时上传。使用分块上传,以便在发生失败时可以重试上传。如果出现错误,将在一段时间后尝试重试。

  • 或者,您可以尝试 Steve 中提到的压缩和解压缩步骤。 .

您可以引用React Deployment on App Service Linux ,和Deploying Node.js to Azure App Service with GitHub Actions

关于node.js - Azure 中的 Angular 工件包含约 43k 个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72359100/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com