Skip to content

Update main_medscribeai.yml #8

Update main_medscribeai.yml

Update main_medscribeai.yml #8

# 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 - MedScribeAI
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Zip source for deployment
run: |
# Exclude virtualenv and any local-only files
zip -r pythonapp.zip . -x "venv/*" ".git/*"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: pythonapp
path: pythonapp.zip
deploy:
runs-on: ubuntu-latest
needs: build
environment: Production
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: pythonapp
- name: Deploy to Azure Web App (Zip Deploy, Run-From-Package)
uses: azure/webapps-deploy@v3
with:
app-name: 'MedScribeAI'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C019728AFB6441DAA6FF45DD99B677A8 }}
package: pythonapp.zip
enable-oryx-build: false