Skip to content

Commit ca4aa88

Browse files
authored
Modify Azure deployment workflow for Node.js app
Updated the workflow to specify the working directory for npm commands and added permissions for the deploy job.
1 parent 9eea32c commit ca4aa88

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

‎.github/workflows/main_todoapp-backend.yml‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
node-version: '22.x'
2525

2626
- name: npm install, build, and test
27+
working-directory: backend
2728
run: |
2829
npm install
2930
npm run build --if-present
@@ -38,22 +39,22 @@ jobs:
3839
deploy:
3940
runs-on: ubuntu-latest
4041
needs: build
41-
permissions:
42-
id-token: write #This is required for requesting the JWT
43-
contents: read #This is required for actions/checkout
42+
permissions:
43+
id-token: write #This is required for requesting the JWT
44+
contents: read #This is required for actions/checkout
4445

4546
steps:
4647
- name: Download artifact from build job
4748
uses: actions/download-artifact@v4
4849
with:
4950
name: node-app
50-
51-
- name: Login to Azure
52-
uses: azure/login@v2
53-
with:
54-
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_4034EF035C424963A1823C64DF6C31DC }}
55-
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_D2A5854D084F476EAF17BAAA61DAA539 }}
56-
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_D7B7EF8AD792443EAB9EE4018636CC94 }}
51+
52+
- name: Login to Azure
53+
uses: azure/login@v2
54+
with:
55+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_4034EF035C424963A1823C64DF6C31DC }}
56+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_D2A5854D084F476EAF17BAAA61DAA539 }}
57+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_D7B7EF8AD792443EAB9EE4018636CC94 }}
5758

5859
- name: 'Deploy to Azure Web App'
5960
id: deploy-to-webapp
@@ -62,4 +63,5 @@ jobs:
6263
app-name: 'ToDoApp-Backend'
6364
slot-name: 'Production'
6465
package: .
65-
66+
67+

0 commit comments

Comments
 (0)