Skip to content

Commit fb558fe

Browse files
authored
1
1 parent ce9ce35 commit fb558fe

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/azure-webapps-node.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,28 @@ on:
66
- main
77
workflow_dispatch:
88

9+
# Add explicit permissions for Azure OIDC
10+
permissions:
11+
id-token: write
12+
contents: read
13+
914
jobs:
1015
build:
1116
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
1220
steps:
1321
- uses: actions/checkout@v4
1422

1523
- name: Setup Node.js
1624
uses: actions/setup-node@v4
1725
with:
18-
node-version: '20.x' # Upgrade to Node 20 to support all dependencies
26+
node-version: '20.x'
1927
cache: 'npm'
2028

2129
- name: Clean install dependencies
2230
run: |
23-
# Clean npm cache and remove lock file to fix rollup issue
2431
npm cache clean --force
2532
rm -f package-lock.json
2633
rm -rf node_modules
@@ -66,18 +73,26 @@ jobs:
6673
deploy:
6774
runs-on: ubuntu-latest
6875
needs: build
76+
permissions:
77+
id-token: write
78+
contents: read
79+
6980
steps:
70-
- uses: actions/download-artifact@v4
81+
- name: Download artifact
82+
uses: actions/download-artifact@v4
7183
with:
7284
name: webapp
7385

74-
- uses: azure/login@v2
86+
- name: Login to Azure
87+
uses: azure/login@v2
7588
with:
7689
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_646B290AC1724693B164CD3D4947B353 }}
7790
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_BD250A8452F0421B94ECF3BD50BFDC47 }}
7891
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A0A3E69559D143F8A11E4E6CD7432251 }}
7992

80-
- uses: azure/webapps-deploy@v3
93+
- name: Deploy to Azure Web App
94+
uses: azure/webapps-deploy@v3
8195
with:
8296
app-name: 'albertoruiz'
97+
slot-name: 'Production'
8398
package: .

0 commit comments

Comments
 (0)