55 branches : [ main ]
66 paths :
77 - ' src/**'
8- - ' docs-site/**'
98 - ' .github/workflows/deploy-pages.yml'
109 workflow_dispatch :
1110
@@ -21,46 +20,28 @@ concurrency:
2120env :
2221 DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
2322 DOTNET_NOLOGO : true
24- NODE_VERSION : ' 20'
2523
2624jobs :
2725 build :
28- name : 🏗️ Build Demo & Docs
26+ name : 🏗️ Build Blazor WASM
2927 runs-on : ubuntu-latest
3028
3129 steps :
32- # ═══════════════════════════════════════════════════════════════════════
33- # 📥 Checkout
34- # ═══════════════════════════════════════════════════════════════════════
3530 - name : 📥 Checkout
3631 uses : actions/checkout@v4
3732
38- # ═══════════════════════════════════════════════════════════════════════
39- # 🔧 Setup .NET
40- # ═══════════════════════════════════════════════════════════════════════
4133 - name : ⚙️ Setup .NET
4234 uses : actions/setup-dotnet@v4
4335 with :
4436 dotnet-version : 8.0.x
4537
46- # ═══════════════════════════════════════════════════════════════════════
47- # 🟢 Setup Node.js (for VitePress)
48- # ═══════════════════════════════════════════════════════════════════════
49- - name : 🟢 Setup Node.js
50- uses : actions/setup-node@v4
51- with :
52- node-version : ${{ env.NODE_VERSION }}
53-
54- # ═══════════════════════════════════════════════════════════════════════
55- # 🏗️ Build Blazor Demo
56- # ═══════════════════════════════════════════════════════════════════════
57- - name : 📦 Restore .NET dependencies
38+ - name : 📦 Restore dependencies
5839 run : dotnet restore JsonViewer.Blazor.sln
5940
60- - name : 🏗️ Build Blazor Solution
41+ - name : 🏗️ Build
6142 run : dotnet build JsonViewer.Blazor.sln --configuration Release --no-restore
6243
63- - name : 📦 Publish Blazor Demo
44+ - name : 📦 Publish Blazor WASM
6445 run : |
6546 dotnet publish src/Blazor.Demo/Blazor.Demo.csproj \
6647 -c Release \
7253 sed -i 's|<base href="/" />|<base href="/Blazor/" />|g' release/wwwroot/index.html
7354 echo "✅ Base href updated to /Blazor/"
7455
75- # ═══════════════════════════════════════════════════════════════════════
76- # 📚 Build VitePress Documentation
77- # ═══════════════════════════════════════════════════════════════════════
78- - name : 📦 Install VitePress dependencies
79- working-directory : docs-site
80- run : npm ci || npm install
81-
82- - name : 📋 Copy logo to docs public folder
83- run : |
84- mkdir -p docs-site/public
85- cp Documents/assets/logo.png docs-site/public/logo.png || echo "Logo not found, skipping"
86-
87- - name : 🏗️ Build VitePress
88- working-directory : docs-site
89- run : npm run docs:build
90-
91- - name : 📁 Copy docs to release folder
92- run : |
93- mkdir -p release/wwwroot/docs
94- cp -r docs-site/.vitepress/dist/* release/wwwroot/docs/
95- echo "✅ Documentation copied to /docs/"
96-
97- # ═══════════════════════════════════════════════════════════════════════
98- # 📝 Final Setup
99- # ═══════════════════════════════════════════════════════════════════════
10056 - name : 📝 Add .nojekyll file
10157 run : touch release/wwwroot/.nojekyll
10258
@@ -107,13 +63,7 @@ jobs:
10763 run : |
10864 echo "📂 Contents of release/wwwroot:"
10965 ls -la release/wwwroot/
110- echo ""
111- echo "📂 Contents of release/wwwroot/docs:"
112- ls -la release/wwwroot/docs/ || echo "No docs folder"
11366
114- # ═══════════════════════════════════════════════════════════════════════
115- # 📤 Upload & Deploy
116- # ═══════════════════════════════════════════════════════════════════════
11767 - name : ⚙️ Setup Pages
11868 uses : actions/configure-pages@v5
11969
@@ -135,13 +85,3 @@ jobs:
13585 - name : 🌐 Deploy to GitHub Pages
13686 id : deployment
13787 uses : actions/deploy-pages@v4
138-
139- - name : 📝 Create Summary
140- run : |
141- echo "## 🚀 Deployment Complete!" >> $GITHUB_STEP_SUMMARY
142- echo "" >> $GITHUB_STEP_SUMMARY
143- echo "### 🔗 Links" >> $GITHUB_STEP_SUMMARY
144- echo "| Site | URL |" >> $GITHUB_STEP_SUMMARY
145- echo "|------|-----|" >> $GITHUB_STEP_SUMMARY
146- echo "| **Live Demo** | https://jsonviewer-component.github.io/Blazor/ |" >> $GITHUB_STEP_SUMMARY
147- echo "| **Documentation** | https://jsonviewer-component.github.io/Blazor/docs/ |" >> $GITHUB_STEP_SUMMARY
0 commit comments