publish profile with g-int

This commit is contained in:
ValueOn AG 2025-09-09 01:20:30 +02:00
parent cf9a94fd79
commit 9b7420e9c1

View file

@ -1,7 +1,3 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
name: Build and deploy Python app to Azure Web App - gateway-int
on:
@ -14,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout
contents: read
steps:
- uses: actions/checkout@v4
@ -34,8 +30,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt --no-cache-dir
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
- name: Zip artifact for deployment
run: zip release.zip ./* -r
@ -51,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
name: 'Production' # Or change to 'Integration' if you prefer
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
@ -65,16 +59,13 @@ jobs:
- name: Set productive environment
run: cp env_int.env .env
- name: Login to Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
# REMOVED: Azure login step - not needed with publish profile
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3 # Using v3 like the working one
id: deploy-to-webapp
with:
app-name: 'gateway-int'
slot-name: 'Production'
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_GATEWAY_INT }}