Skip to content

Commit a1da1fd

Browse files
committed
no longer static?
1 parent a5375ec commit a1da1fd

File tree

2 files changed

+45
-37
lines changed

2 files changed

+45
-37
lines changed

.github/workflows/main_pubsite.yml

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,52 @@ on:
77

88
permissions:
99
contents: read
10-
id-token: write # OIDC → Azure login
11-
12-
env:
13-
NODE_VERSION: '20'
10+
id-token: write
1411

1512
jobs:
1613
build-and-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 }}
27-
28-
- name: 📦 Install deps & build static site
29-
run: |
30-
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 ..
38-
39-
- name: 🔐 Azure login (OIDC)
40-
uses: azure/login@v2
41-
with:
42-
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E5978DC6004B4BB995ACD60ADAF513EF }}
43-
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8824E98435E440FAA46E146AD7716A44 }}
44-
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A3ECC57385541ACB3AC40EA396FC5B5 }}
45-
46-
- name: 🚀 Deploy zip to Web App
47-
uses: azure/webapps-deploy@v3
48-
with:
49-
app-name: pubsite
50-
package: pubsite.zip
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '20'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build Next.js app
28+
run: npm run build
29+
30+
- name: Zip for deployment
31+
run: |
32+
zip -r pubsite.zip . -x ".git/*" ".github/*" "node_modules/*"
33+
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: site-package
37+
path: pubsite.zip
38+
39+
- uses: actions/download-artifact@v4
40+
with:
41+
name: site-package
42+
path: .
43+
44+
- name: Unzip
45+
run: unzip -o pubsite.zip
46+
47+
- name: Azure Login
48+
uses: azure/login@v2
49+
with:
50+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E5978DC6004B4BB995ACD60ADAF513EF }}
51+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8824E98435E440FAA46E146AD7716A44 }}
52+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A3ECC57385541ACB3AC40EA396FC5B5 }}
53+
54+
- name: Deploy to Azure Web App
55+
uses: azure/webapps-deploy@v3
56+
with:
57+
app-name: pubsite
58+
package: .

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "next dev",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start -p 8080"
99
},
1010
"dependencies": {
1111
"@heroicons/react": "^2.2.0",

0 commit comments

Comments
 (0)