@@ -22,35 +22,40 @@ jobs:
22
22
with :
23
23
python-version : ' 3.11'
24
24
25
- - name : Create and start virtual environment
25
+ - name : Create and start virtual environment in server directory
26
26
run : |
27
+ cd ./server
27
28
python -m venv venv
28
29
source venv/bin/activate
29
30
30
31
- name : Install dependencies
31
- run : pip install -r requirements.txt
32
+ run : |
33
+ cd ./server
34
+ pip install -r requirements.txt
32
35
33
36
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
34
37
35
38
- name : Zip artifact for deployment
36
- run : zip release.zip ./* -r
39
+ run : |
40
+ cd ./server
41
+ zip release.zip ./* -r
37
42
38
43
- name : Upload artifact for deployment jobs
39
44
uses : actions/upload-artifact@v4
40
45
with :
41
46
name : python-app
42
47
path : |
43
- release.zip
44
- !venv/
48
+ ./server/ release.zip
49
+ !./server/ venv/
45
50
46
51
deploy :
47
52
runs-on : ubuntu-latest
48
53
needs : build
49
54
environment :
50
55
name : ' Production'
51
56
url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
52
- permissions :
53
- id-token : write # This is required for requesting the JWT
57
+ permissions :
58
+ id-token : write # This is required for requesting the JWT
54
59
55
60
steps :
56
61
- name : Download artifact from build job
@@ -59,15 +64,15 @@ jobs:
59
64
name : python-app
60
65
61
66
- name : Unzip artifact for deployment
62
- run : unzip release.zip
67
+ run : unzip ./server release.zip
63
68
64
-
65
- - name : Login to Azure
66
- uses : azure/login@v2
67
- with :
68
- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_26FCC6BE4D3D4EB68BDD436CE7659427 }}
69
- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_EE8D6B43D1DD4CD1AF32A36BDED9F9CE }}
70
- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EE0C973756654530B0F1EE3790668553 }}
69
+
70
+ - name : Login to Azure
71
+ uses : azure/login@v2
72
+ with :
73
+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_26FCC6BE4D3D4EB68BDD436CE7659427 }}
74
+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_EE8D6B43D1DD4CD1AF32A36BDED9F9CE }}
75
+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EE0C973756654530B0F1EE3790668553 }}
71
76
72
77
- name : ' Deploy to Azure Web App'
73
78
uses : azure/webapps-deploy@v3
0 commit comments