question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application deployment to staging slot

See original GitHub issue

I’m sorry if this is not the right place to report this issue, feel free to direct me elsewhere.

I’m currently working on a test application to evaluate the capabilities of GH Actions and the Azure AppService. I’ve been using the default node.js example and built upon that. Deploying the the production slot of my App Service worked without any issues. However, my issue is the deployment to other deployment slots such as staging.

Currently, there is no mention of the “slot-name” property in the documentation other than #25. Since official documentation is lacking I referred to the issue when formatting my configuration which now looks like this

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Deployment Pipeline

on:
  pull_request:
    branches: [ master ]
  push:
    branches: [ master ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [12.x]

    steps:
    - name: 'Checkut Code'
      uses: actions/checkout@v2
    - name: Install Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    #- run: npm test
    - name: 'Deploy to Azure App Service'
      uses: azure/webapps-deploy@v2
      with:
        app-name: 'my-app'
        publish-profile: ${{ secrets.AZURE_PUBLISHING_PROFILE }}
        slot-name: 'staging'

I generated the publishing profile using the “Generate publish profile” on the panel, but using the azure cli with the --xml flag produces the same output. I also manually created the deployment slot using the panel.

Executing the workflow with the configuration shown above results in the following error:

##[error]Deployment Failed with Error: Error: Publish profile is invalid for app-name and slot-name provided. Provide correct publish profile credentials for app.

wich appears to be caused by failing the validation here

https://github.com/Azure/webapps-deploy/blob/e985d6f66d42727d915c98d12585d59f9e15dbb3/src/ActionInputValidator/Validations.ts#L25-L38

I followed this document for general setup of my workflow.

Were there any breaking changes that resulted in the documentation being outdated?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
AmrutaKawadecommented, Aug 26, 2020

I agree this should be documented. I personally was aware that deployment slots have their own publish profile. What is not clear is what the value of app-name should be when slot-name is specified. Continuing @modev 's example - should app-name be “testapp” or “testapp__staging”??

app-name will be ‘testapp’ and slot-name will be ‘staging’. We will update our documentation for getting publish profile for slots

2reactions
drewidcommented, Nov 29, 2021

This still is not described anywhere that I can find - what is supposed to be for app name and slot name for github actions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up staging environments - Azure App Service
Deployment slots are live apps with their own host names. App content and configurations elements can be swapped between two deployment slots, ...
Read more >
Azure Deployment Slots: Benefits and How to Use Them
Instead of deploying your Web App to a staging slot, you could have deployed it as whole new App Service. But here is...
Read more >
Azure deployment slots - Pragim Tech
Azure deployment slots are very useful. They allow you to run multiple versions of your application code on the same infrastructure. Let's understand...
Read more >
Understanding Deployment Slots in Azure App Services
Azure deployment slots allow your web apps to function in different instances called slots. Slots are different environments accessed through a publically ...
Read more >
How do deployment slot settings work on an Azure App Service?
an app setting marked as a "deployment slot setting" on myapp will always stick with myapp and will never move to myapp/staging during...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found