Deploy 2 repos to Azure Web App

Hedone 1 Reputation point
2021-05-20T02:49:34.31+00:00

I have a .Net 5 Azure Web App.
Currently I deploy .Net Web app from github using .yml file.
I want do deploy front-end from different github repository to wwwroot.
Unfortunately, "output_location" doesn't work for azure/webapps-deploy@v2. Any suggestions?

name: Build&Deploy Node.js app to Azure Web App

on:
  push:
    branches:
      - master
  workflow_dispatch:

env:
  AZURE_WEBAPP_NAME: <name>
  AZURE_WEBAPP_PACKAGE_PATH: 'build' 
  NODE_VERSION: '12.x'                # node version to use

jobs:
  build-and-deploy:
    name: Build and Deploy
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${<!-- -->{ env.NODE_VERSION }}
      uses: actions/setup-node@v1
      with:
        node-version: ${<!-- -->{ env.NODE_VERSION }}
    - name: npm install, build, and test
      run: |
        # Build the project, then
        # deploy to Azure Web App.
        npm install
        CI=false npm run build --if-present
build/process.json
    - name: 'Deploy to Azure WebApp'
      uses: azure/webapps-deploy@v2
      with:
        app-name: ${<!-- -->{ env.AZURE_WEBAPP_NAME }}
        slot-name: 'production' 
        publish-profile: ${<!-- -->{ secrets.AzureAppService_PublishProfile }}
        package: ${<!-- -->{ env.AZURE_WEBAPP_PACKAGE_PATH }}
        output_location: 'wwwroot'
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,535 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 20,861 Reputation points Microsoft Employee
    2021-05-24T09:19:08.723+00:00

    @Hedone , There is only one repository supported per App Service. However, you may use git module to pull other repo along. Please see this helloworld sample https://github.com/KuduApps/RepoWithPublicSubModule for the approach.

    0 comments No comments