77 workflow_dispatch :
88
99env :
10- AZURE_FUNCTIONAPP_PACKAGE_PATH : " ./app/workers"
1110 AZURE_WEBAPP_PACKAGE_PATH : " ./app/next-client-app"
12- PYTHON_VERSION : " 3.11"
1311 NODE_VERSION : 20
1412 app-name : carrot
1513 repo-owner : health-informatics-uon
@@ -20,43 +18,6 @@ permissions:
2018 packages : write # Required to publish packages
2119
2220jobs :
23- build-and-publish-workers :
24- runs-on : ubuntu-latest
25- steps :
26- - name : " Checkout GitHub Action"
27- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28-
29- - name : Setup Python ${{ env.PYTHON_VERSION }} Environment
30- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
31- with :
32- python-version : ${{ env.PYTHON_VERSION }}
33-
34- - name : " Install UV and Pip"
35- run : |
36- python -m pip install --upgrade pip
37- pip install uv
38-
39- - name : " Resolve Project Dependencies Using UV"
40- run : |
41- pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
42- uv pip compile pyproject.toml --output-file requirements.txt
43- popd
44- shell : bash
45-
46- - name : " Install Dependencies Using Pip"
47- shell : bash
48- run : |
49- pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
50- pip install -r requirements.txt --target=".python_packages/lib/site-packages"
51- popd
52-
53- - name : Upload artifact for deployment job
54- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
55- with :
56- name : functionsapp
57- path : ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
58- include-hidden-files : true
59-
6021 build-and-publish-web :
6122 runs-on : " ubuntu-latest"
6223
@@ -193,32 +154,10 @@ jobs:
193154 platforms : linux/amd64,linux/arm64
194155 tags : ${{ steps.scheduler_meta.outputs.tags }}
195156
196- # Deploy Workers Dev
197- deploy-workers-dev :
198- runs-on : ubuntu-latest
199- needs : [build-and-publish-workers, build-and-publish-web]
200- environment : dev
201-
202- steps :
203- - name : Download artifact from build job
204- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
205- with :
206- path : functionsapp
207- name : functionsapp
208-
209- - name : " Run Azure Functions Action"
210- uses : Azure/functions-action@0bd707f87c0b6385742bab336c74e1afc61f6369 # v1.5.3
211- id : fa
212- with :
213- app-name : ${{ vars.AZURE_FUNCTIONS_NAME }}
214- slot-name : " production"
215- package : ${{ github.workspace }}/functionsapp
216- publish-profile : ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}
217-
218157 # Deploy Web App Dev
219158 deploy-web-dev :
220159 runs-on : ubuntu-latest
221- needs : [build-and-publish-web, deploy-workers-dev ]
160+ needs : [build-and-publish-web]
222161 environment :
223162 name : " dev"
224163 url : ${{ steps.deploy-web-dev.outputs.webapp-url }}
@@ -330,32 +269,10 @@ jobs:
330269 publish-profile : ${{ secrets.AIRFLOW_SCHEDULER_PUBLISH_PROFILE }}
331270 images : ${{ env.registry }}/${{ env.repo-owner }}/${{ env.app-name }}/airflow-scheduler:${{ github.sha }}
332271
333- # Deploy Workers Test
334- deploy-workers-test :
335- runs-on : ubuntu-latest
336- needs : deploy-workers-dev
337- environment : test
338-
339- steps :
340- - name : Download artifact from build job
341- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
342- with :
343- path : functionsapp
344- name : functionsapp
345-
346- - name : " Run Azure Functions Action"
347- uses : Azure/functions-action@0bd707f87c0b6385742bab336c74e1afc61f6369 # v1.5.3
348- id : fa
349- with :
350- app-name : ${{ vars.AZURE_FUNCTIONS_NAME }}
351- slot-name : " production"
352- package : ${{ github.workspace }}/functionsapp
353- publish-profile : ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}
354-
355272 # Deploy Web App Test
356273 deploy-web-test :
357274 runs-on : ubuntu-latest
358- needs : [deploy-web-dev, deploy-workers-test ]
275+ needs : [deploy-web-dev]
359276 environment :
360277 name : " test"
361278 url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
0 commit comments