Skip to content

Commit b828a43

Browse files
committed
feat: add GitHub Actions workflow to build and deploy Python app to Azure Web App 'gymbro'
1 parent df47bb2 commit b828a43

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.github/workflows/main_gymbro.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
# 🛠️ Local Build Section (Optional)
2828
# The following section in your workflow is designed to catch build issues early on the client side, before deployment. This can be helpful for debugging and validation. However, if this step significantly increases deployment time and early detection is not critical for your workflow, you may remove this section to streamline the deployment process.
2929
- name: Create and Start virtual environment and Install dependencies
30+
working-directory: ./backend
3031
run: |
3132
python -m venv antenv
3233
source antenv/bin/activate
@@ -38,8 +39,10 @@ jobs:
3839
with:
3940
name: python-app
4041
path: |
41-
.
42-
!antenv/
42+
./backend
43+
!./backend/antenv/
44+
!./backend/.venv/
45+
!./backend/.env
4346
4447
# 🚫 Opting Out of Oryx Build
4548
# If you prefer to disable the Oryx build process during deployment, follow these steps:
@@ -50,22 +53,22 @@ jobs:
5053
deploy:
5154
runs-on: ubuntu-latest
5255
needs: build
53-
permissions:
54-
id-token: write #This is required for requesting the JWT
55-
contents: read #This is required for actions/checkout
56+
permissions:
57+
id-token: write #This is required for requesting the JWT
58+
contents: read #This is required for actions/checkout
5659

5760
steps:
5861
- name: Download artifact from build job
5962
uses: actions/download-artifact@v4
6063
with:
6164
name: python-app
62-
63-
- name: Login to Azure
64-
uses: azure/login@v2
65-
with:
66-
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_106F58A50E4D4D369496B1C5E7D299C3 }}
67-
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_5EAE941BA6DB44AFAD213E04CE1478F1 }}
68-
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6637D6E616BE43A890CFDC7B4156DC1D }}
65+
66+
- name: Login to Azure
67+
uses: azure/login@v2
68+
with:
69+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_106F58A50E4D4D369496B1C5E7D299C3 }}
70+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_5EAE941BA6DB44AFAD213E04CE1478F1 }}
71+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6637D6E616BE43A890CFDC7B4156DC1D }}
6972

7073
- name: 'Deploy to Azure Web App'
7174
uses: azure/webapps-deploy@v3

0 commit comments

Comments
 (0)