Skip to content

Commit 4353e1b

Browse files
Update main_medscribeai.yml
1 parent 7e84588 commit 4353e1b

1 file changed

Lines changed: 19 additions & 33 deletions

File tree

.github/workflows/main_medscribeai.yml

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,45 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read #This is required for actions/checkout
18-
1916
steps:
2017
- uses: actions/checkout@v4
2118

22-
- name: Set up Python version
19+
- name: Set up Python 3.12
2320
uses: actions/setup-python@v5
2421
with:
2522
python-version: '3.12'
2623

27-
- name: Create and start virtual environment
28-
run: |
29-
python -m venv venv
30-
source venv/bin/activate
31-
3224
- name: Install dependencies
33-
run: pip install -r requirements.txt
34-
35-
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
3628
37-
- name: Zip artifact for deployment
38-
run: zip release.zip ./* -r
29+
- name: Zip source for deployment
30+
run: |
31+
# Exclude virtualenv and any local-only files
32+
zip -r pythonapp.zip . -x "venv/*" ".git/*"
3933
40-
- name: Upload artifact for deployment jobs
34+
- name: Upload build artifact
4135
uses: actions/upload-artifact@v4
4236
with:
43-
name: python-app
44-
path: |
45-
release.zip
46-
!venv/
37+
name: pythonapp
38+
path: pythonapp.zip
4739

4840
deploy:
4941
runs-on: ubuntu-latest
5042
needs: build
51-
environment:
52-
name: 'Production'
53-
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
54-
43+
environment: Production
44+
5545
steps:
56-
- name: Download artifact from build job
46+
- name: Download build artifact
5747
uses: actions/download-artifact@v4
5848
with:
59-
name: python-app
60-
61-
- name: Unzip artifact for deployment
62-
run: unzip release.zip
49+
name: pythonapp
6350

64-
65-
- name: 'Deploy to Azure Web App'
51+
- name: Deploy to Azure Web App (Zip Deploy, Run-From-Package)
6652
uses: azure/webapps-deploy@v3
67-
id: deploy-to-webapp
6853
with:
6954
app-name: 'MedScribeAI'
70-
slot-name: 'Production'
71-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C019728AFB6441DAA6FF45DD99B677A8 }}
55+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C019728AFB6441DAA6FF45DD99B677A8 }}
56+
package: pythonapp.zip
57+
enable-oryx-build: false

0 commit comments

Comments
 (0)