Skip to content

Commit 9385478

Browse files
fix: Restore demo-only deployment and fix documentation link
1 parent 959750b commit 9385478

File tree

2 files changed

+5
-65
lines changed

2 files changed

+5
-65
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
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:
2120
env:
2221
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
2322
DOTNET_NOLOGO: true
24-
NODE_VERSION: '20'
2523

2624
jobs:
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 \
@@ -72,31 +53,6 @@ jobs:
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

src/Blazor.Demo/Pages/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
<nav class="header-nav">
20-
<a href="https://jsonviewer-component.github.io/Blazor/docs/" target="_blank" class="nav-link docs-link">
20+
<a href="https://github.com/JsonViewer-Component/Blazor#readme" target="_blank" class="nav-link docs-link">
2121
<span class="nav-icon">📚</span>
2222
<span>Documentation</span>
2323
</a>

0 commit comments

Comments
 (0)