File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 branches :
1010 - main
1111 paths :
12- - ' api/**' # Only trigger when API folder changes
12+ - ' api/**'
1313 workflow_dispatch :
1414
1515jobs :
16- build :
16+ build-and-deploy :
1717 runs-on : ubuntu-latest
18- permissions :
19- contents : read
2018
2119 steps :
2220 - uses : actions/checkout@v4
@@ -37,51 +35,21 @@ jobs:
3735 cd api
3836 pip install -r requirements.txt
3937
40- # Optional: Add step to run tests here
4138 - name : Test Azure connection
4239 run : |
4340 cd api
4441 echo "Testing imports..."
4542 python -c "import fastapi, azure.storage.blob; print('✅ Dependencies OK')"
4643
47- - name : Upload artifact for deployment jobs
48- uses : actions/upload-artifact@v4
49- with :
50- name : python-app
51- path : |
52- api/
53- !api/venv/
54- !api/__pycache__/
55- !api/**/__pycache__/
56-
57- deploy :
58- runs-on : ubuntu-latest
59- needs : build
60- environment :
61- name : ' Production'
62- url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
63- permissions :
64- id-token : write
65- contents : read
66-
67- steps :
68- - name : Download artifact from build job
69- uses : actions/download-artifact@v4
70- with :
71- name : python-app
72-
7344 - name : Login to Azure
7445 uses : azure/login@v2
7546 with :
76- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_4BC0FD0403AC4B57B2ACD52482598228 }}
77- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_665B9D12BF6F49D5BB2D604FC3E837EF }}
78- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F46C281934A441D99F06B0919D4CD4AC }}
47+ creds : ${{ secrets.AZURE_CREDENTIALS }}
7948
80- - name : ' Deploy to Azure Web App'
49+ - name : Deploy to Azure Web App
8150 uses : azure/webapps-deploy@v3
82- id : deploy-to-webapp
8351 with :
8452 app-name : ' jurisfind-app'
8553 slot-name : ' Production'
86- startup-command : ' cd /home/site/wwwroot && chmod +x start.sh && ./start.sh '
54+ package : ' ./api '
8755
You can’t perform that action at this time.
0 commit comments