File tree Expand file tree Collapse file tree 1 file changed +14
-25
lines changed
Expand file tree Collapse file tree 1 file changed +14
-25
lines changed Original file line number Diff line number Diff line change 1- name : Build & Deploy to Azure Web App (pubsite)
1+ name : Build & Deploy to Azure Web App
22
33on :
44 push :
5- branches : [main]
5+ branches : [ main ]
66 workflow_dispatch :
77
88permissions :
99 contents : read
10- id-token : write # OIDC → Azure login
11-
12- env :
13- NODE_VERSION : ' 20'
10+ id-token : write # for OIDC login
1411
1512jobs :
16- build-and- deploy :
13+ build-deploy :
1714 runs-on : ubuntu-latest
1815
1916 steps :
20- - name : ⬇️ Checkout
21- uses : actions/checkout@v4
22-
23- - name : ⎔ Use Node ${{ env.NODE_VERSION }}
24- uses : actions/setup-node@v3
25- with :
26- node-version : ${{ env.NODE_VERSION }}
17+ # 1️⃣ Checkout
18+ - uses : actions/checkout@v4
2719
28- - name : 📦 Install deps & build static site
20+ # 2️⃣ Install & build
21+ - name : Install deps & build
2922 run : |
3023 npm ci
31- npm run build # creates ./out
32-
33- - name : 📚 Create deployment zip (only ./out)
34- run : |
35- cd out
36- zip -r ../pubsite.zip .
37- cd ..
24+ npm run build # <— NO `npm run export`
3825
39- - name : 🔐 Azure login (OIDC)
26+ # 3️⃣ Login to Azure (OIDC)
27+ - name : Azure login
4028 uses : azure/login@v2
4129 with :
4230 client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_E5978DC6004B4BB995ACD60ADAF513EF }}
4331 tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_8824E98435E440FAA46E146AD7716A44 }}
4432 subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A3ECC57385541ACB3AC40EA396FC5B5 }}
4533
46- - name : 🚀 Deploy zip to Web App
34+ # 4️⃣ Deploy the repository (Azure will run `npm install` again and start `next start`)
35+ - name : Deploy to Azure Web App
4736 uses : azure/webapps-deploy@v3
4837 with :
4938 app-name : pubsite
50- package : pubsite.zip
39+ package : .
You can’t perform that action at this time.
0 commit comments