File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 11# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2- # More GitHub Actions for Azure: https://github.com/Azure/actions
3- # More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
4-
52name : Build and deploy Python app to Azure Web App - gymbro
63
74on :
@@ -21,17 +18,23 @@ jobs:
2118 with :
2219 python-version : ' 3.11'
2320
24- # Copy all files from backend to a clean working directory
25- - name : Prepare deployment folder
21+ - name : Create venv and install dependencies
22+ run : |
23+ cd backend
24+ python -m venv antenv
25+ source antenv/bin/activate
26+ pip install -r requirements.txt
27+
28+ - name : Prepare deployment package
2629 run : |
27- mkdir python-app
28- rsync -a --exclude='.venv' --exclude='antenv' --exclude=' .env' --exclude='__pycache__' --exclude='.pytest_cache' backend/ python-app /
30+ mkdir deploy
31+ rsync -a --exclude='.venv' --exclude='.env' --exclude='__pycache__' --exclude='.pytest_cache' backend/ deploy /
2932
3033 - name : Upload artifact for deployment jobs
3134 uses : actions/upload-artifact@v4
3235 with :
3336 name : python-app
34- path : python-app /
37+ path : deploy /
3538
3639 deploy :
3740 runs-on : ubuntu-latest
4447 uses : actions/download-artifact@v4
4548 with :
4649 name : python-app
47- path : .
4850
4951 - name : Login to Azure
5052 uses : azure/login@v2
You can’t perform that action at this time.
0 commit comments