Giter VIP home page Giter VIP logo

Comments (15)

suyash691 avatar suyash691 commented on August 14, 2024 1

+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

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024 1

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

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@guillaumemeyer startup-command input is not supported in v1. It is supported in v2.
Please refer the inputs for v1 - https://github.com/Azure/webapps-deploy/blob/v1/action.yml

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024

Thanks @aksm-ms . I just upgraded to v2 and it works.

As a feedback, it's quite easy from this repo to find docs about v2 without realizing it (or maybe it's just me ;-) ).
For instance from this page, you have to notice then switch the tag:
image
Maybe including the version number as a comment directly in the action.yml would be helpful.

Also, what is the status of v2? Is it considered as production ready? Again, having this info from the README page would be great.

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024

Rectification, I now have this issue:
image
We're running on Linux container, so I think this issue is related to how we're managing publish-profile...
Is it useful to try with v2.1? Any documentation that would describe the differences?

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024

Same problem with v2.1

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

As a feedback, it's quite easy from this repo to find docs about v2 without realizing it (or maybe it's just me ;-) ).
For instance from this page, you have to notice then switch the tag:
image
Maybe including the version number as a comment directly in the action.yml would be helpful.

Can you please explain more here? I am unable to understand the exact problem.

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

Also, what is the status of v2? Is it considered as production ready? Again, having this info from the README page would be great.

v2 is production ready and released to marketplace.

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

Rectification, I now have this issue:
image
We're running on Linux container, so I think this issue is related to how we're managing publish-profile...
Is it useful to try with v2.1? Any documentation that would describe the differences?

Please share the workflow for debugging.

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024
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@v2
        with:
          app-name: "REDACTED"
          startup-command: "npm run api-prd"
          slot-name: "production"
          publish-profile: REDACTED
          package: .

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

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

This check is used only for validating windows apps and publish profile auth scheme.

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024

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

OK I'm gonna try this

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@guillaumemeyer any update?

from webapps-deploy.

guillaumemeyer avatar guillaumemeyer commented on August 14, 2024

Quite busy these days, gonna try this next week

from webapps-deploy.

naithagoni avatar naithagoni commented on August 14, 2024

Hi,
Is this error fixed?

I am getting the same error for my Angular web app which is deploying to Azure App Service on Linux.
image

Here is my sample actions.yml:

name: REDACTED
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Node.js version
        uses: actions/setup-node@v4
        with:
          node-version: "20.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@v3
        with:
          app-name: "REDACTED"
          slot-name: "production"
          publish-profile: REDACTED
          package: .
          startup-command: "pm2 serve /home/site/wwwroot --no-daemon --spa"

from webapps-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.