I'm pretty new on Azure e Git usage and I'm having some problems to deploy 2 WebJob to Azure App Service via Git. When I deploy one of them it replaces the other. Am I missing some configuration?
When the deploy goes via Visual Studio works fine, I can get this 2 WebJobs together but I really need to know how to do it via Git.
.yml
on:
workflow_dispatch:
env:
WEBJOB1_NAME: CUSTOMER
WEBJOB2_NAME: PRODUCT
DOTNET_VERSION: '3.1.x'
jobs:
customer-dev-release:
name: Release customer to DEV
runs-on: ubuntu-latest
environment: CUSTOMER-DEV
steps:
# Checkout the repo
- uses: actions/checkout@v2
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build with dotnet
run: |
dotnet build --configuration Release
- name: dotnet test
run: |
dotnet test --no-build --no-restore --verbosity normal --configuration Release
- name: dotnet publish
run: |
dotnet publish -c Release -o './App_Data/Jobs/Continuous/${{ env.WEBJOB1_NAME }}'
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: ACCOUNT-DEV
publish-profile: ${{ secrets.PUBLISH_PROFILE_DEV }}
package: '.'
product-dev-release:
name: Release product to DEV
runs-on: ubuntu-latest
environment: PRODUCT-DEV
steps:
# Checkout the repo
- uses: actions/checkout@v2
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build with dotnet
run: |
dotnet build --configuration Release
- name: dotnet test
run: |
dotnet test --no-build --no-restore --verbosity normal --configuration Release
- name: dotnet publish
run: |
dotnet publish -c Release -o './App_Data/Jobs/Continuous/${{ env.WEBJOB2_NAME }}'
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: ACCOUNT-DEV
publish-profile: ${{ secrets.PUBLISH_PROFILE_DEV }}
package: '.'
Any suggestions please?