Skip to content

Commit 2fca79e

Browse files
NeverMorewdclaude
andcommitted
ci: deploy Avalonia WASM demo to GitHub Pages on every push to main
deploy-wasm.yml: - Triggers on push to main and workflow_dispatch (manual) - Installs .NET 10 + wasm-tools workload - Publishes samples/Pipboy.Avalonia.Demo.Browser in Release mode - Adds .nojekyll (prevents Jekyll mangling _framework/ assets) - Copies index.html → 404.html (SPA deep-link fallback) - Deploys via actions/deploy-pages (no branch or PAT required) - Exposes live URL via environment: github-pages README: add NuGet badge, Live Demo badge, and direct link to https://nevermorewd.github.io/Pipboy.Avalonia/ One-time setup required in repo Settings → Pages: Source → "GitHub Actions" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f3311a1 commit 2fca79e

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/deploy-wasm.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Deploy WASM Demo → GitHub Pages
2+
3+
on:
4+
# Auto-deploy whenever main is updated
5+
push:
6+
branches: [ main ]
7+
# Allow triggering manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Required for the deploy-pages action
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Only one Pages deployment runs at a time; new runs cancel the in-progress one
17+
concurrency:
18+
group: github-pages
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build-and-deploy:
23+
name: Build WASM & Deploy to GitHub Pages
24+
runs-on: ubuntu-latest
25+
26+
# Exposes the live URL in the Actions summary
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deploy.outputs.page_url }}
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup .NET 10
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: '10.x'
39+
40+
# wasm-tools is required for Avalonia Browser / Blazor-style WASM publishing
41+
- name: Install WASM workload
42+
run: dotnet workload install wasm-tools
43+
44+
# Publish produces the runnable site under <output>/wwwroot
45+
- name: Publish Browser project
46+
run: |
47+
dotnet publish samples/Pipboy.Avalonia.Demo.Browser/Pipboy.Avalonia.Demo.Browser.csproj \
48+
--configuration Release \
49+
--output ${{ runner.temp }}/publish
50+
51+
# .nojekyll stops GitHub Pages from running Jekyll, which would mangle
52+
# Blazor/Avalonia asset filenames that start with underscores.
53+
- name: Add .nojekyll
54+
run: touch ${{ runner.temp }}/publish/wwwroot/.nojekyll
55+
56+
# GitHub Pages returns 404 for deep links; serving index.html as the 404
57+
# page lets Avalonia's own router (if any) handle the path client-side.
58+
- name: Copy index.html → 404.html
59+
run: cp ${{ runner.temp }}/publish/wwwroot/index.html \
60+
${{ runner.temp }}/publish/wwwroot/404.html
61+
62+
- name: Configure GitHub Pages
63+
uses: actions/configure-pages@v5
64+
65+
- name: Upload Pages artifact
66+
uses: actions/upload-pages-artifact@v3
67+
with:
68+
path: ${{ runner.temp }}/publish/wwwroot
69+
70+
- name: Deploy to GitHub Pages
71+
id: deploy
72+
uses: actions/deploy-pages@v4

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Pipboy.Avalonia
22

33
[![Built with Claude Code](https://img.shields.io/badge/Built%20with-Claude%20Code-blueviolet?logo=anthropic)](https://claude.ai/claude-code)
4+
[![NuGet](https://img.shields.io/nuget/v/Pipboy.Avalonia?logo=nuget)](https://www.nuget.org/packages/Pipboy.Avalonia)
5+
[![Live Demo](https://img.shields.io/badge/Live%20Demo-GitHub%20Pages-brightgreen?logo=github)](https://nevermorewd.github.io/Pipboy.Avalonia/)
46

57
A Fallout 4 Pip-Boy inspired theme library for [Avalonia UI](https://avaloniaui.net/).
68

79
Sharp corners, monochromatic phosphor palette, retro terminal aesthetic — drop it in as your sole application theme and every standard control gets the Vault-Tec treatment.
810

11+
**[▶ Try the live WASM demo](https://nevermorewd.github.io/Pipboy.Avalonia/)** — runs entirely in the browser, no install needed.
12+
913
> A significant portion of this codebase was written with [Claude Code](https://claude.ai/claude-code).
1014
1115
---

0 commit comments

Comments
 (0)