1

So I have this this small Angular project of mine and every time I try to deploy it to Azure, it uploads ~43k files as an artifact. I'm not any good at deployment to Azure, so this may as well be a really stupid question, but still.

So, here is my GitHub Actions workflow file

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

So, here I have a path, that matches my project's name: minesweeper_ and app name is from azure

Here is the GH log

What am I doing wrong here

https://github.com/yan14171/Minesweeper - here is the repo itselff

PavelPerov
  • 65
  • 5

1 Answers1

2

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

As per documentation:

  • During upload, each file is uploaded concurrently in 4MB chunks using a separate HTTPS connection per file. Chunked uploads are used so that in the event of a failure, the upload can be retried. If there is an error, a retry will be attempted after a certain period of time.

  • Alternatively, you can try zip and unzip steps as mentioned by Steve.

You can refer to React Deployment on App Service Linux, and Deploying Node.js to Azure App Service with GitHub Actions

Ecstasy
  • 1,866
  • 1
  • 9
  • 17