webapps-deploy: startup-command parameter is ignored

We’re using this GitHub action to deploy an app to Azure App Services. The workflows seems to works (and the deployment occurs) but the startup-command is ignored, and GitHub raises an error:

image

This message contradicts the yaml action definition file.

Here is our yaml action file:

name: REDACTED
on:
  push:
    branches:
      - production
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Set up Node.js version
        uses: actions/setup-node@v1
        with:
          node-version: "10.x"
      - name: npm install, build, and test
        run: |
          npm install
          npm run build --if-present
          npm run test --if-present
      - name: "Deploy to Azure Web App"
        uses: azure/webapps-deploy@v1
        with:
          app-name: "REDACTED"
          startup-command: "npm run api-prd"
          slot-name: "production"
          publish-profile: REDACTED
          package: .

Am I missing something or is it a known issue?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

+1 on this issue with v2 The line in validation.js

 if (!!startupCommand) {
        throw new Error("startup-command is not a valid input for Windows web app or with publish-profile auth scheme.");
    }

This will always cause an exception to be thrown if startupcommand is present since this will evaluate to true with a non empty string

currently startup-command is not supported for windows web apps and if publish profile auth scheme is used. Please use Azure login before webapps-deploy action to use startup command with linux container. Refer Sample workflow