service-preprocessing/.github/workflows/main_poweron-althaus-preprocess-prod.yml
2025-11-03 12:19:58 +01:00

63 lines
1.7 KiB
YAML

name: Build and deploy Python app to Azure Web App - althaus-preprocessing
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
# ---------- BACKEND / PYTHON ----------
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
# ---------- ARTIFACT ----------
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
with:
name: python-app
path: |
.
!venv/
!.venv/
!.git/
!.cache/
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write
contents: read
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: python-app
- name: Login to Azure (OIDC)
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_3720212D35D047C38CEE2F365F1D81C7 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_AC3FDD6C7376466AA44A309428618439 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_94A2088C685A46DFAE2BFBA50714B1DA }}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: "poweron-althaus-preprocess-prod"
slot-name: "Production"
package: . # reuse the downloaded artifact folder