Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Install WASM workload
run: dotnet workload install wasm-tools

- name: Restore dependencies
run: |
dotnet restore src/PlanViewer.Core/PlanViewer.Core.csproj
dotnet restore src/PlanViewer.App/PlanViewer.App.csproj
dotnet restore src/PlanViewer.Cli/PlanViewer.Cli.csproj
dotnet restore src/PlanViewer.Web/PlanViewer.Web.csproj
dotnet restore tests/PlanViewer.Core.Tests/PlanViewer.Core.Tests.csproj

- name: Build all projects
run: |
dotnet build src/PlanViewer.Core/PlanViewer.Core.csproj -c Release --no-restore
dotnet build src/PlanViewer.App/PlanViewer.App.csproj -c Release --no-restore
dotnet build src/PlanViewer.Cli/PlanViewer.Cli.csproj -c Release --no-restore
dotnet build src/PlanViewer.Web/PlanViewer.Web.csproj -c Release --no-restore
dotnet build tests/PlanViewer.Core.Tests/PlanViewer.Core.Tests.csproj -c Release --no-restore

- name: Run tests
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy Web App

on:
push:
branches: [main]
paths:
- 'src/PlanViewer.Core/**'
- 'src/PlanViewer.Web/**'
- '.github/workflows/deploy-web.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v4

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install WASM workload
run: dotnet workload install wasm-tools

- name: Publish Blazor WASM
run: dotnet publish src/PlanViewer.Web/PlanViewer.Web.csproj -c Release -o publish

- name: Add .nojekyll
run: touch publish/wwwroot/.nojekyll

- name: Add CNAME
run: echo 'plans.erikdarling.com' > publish/wwwroot/CNAME

- name: Add 404 fallback
run: cp publish/wwwroot/index.html publish/wwwroot/404.html

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: publish/wwwroot

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 7 additions & 0 deletions PlanViewer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanViewer.App", "src\PlanV
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanViewer.Cli", "src\PlanViewer.Cli\PlanViewer.Cli.csproj", "{1504CE29-3CBF-4F0B-A46E-54644946B8ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanViewer.Web", "src\PlanViewer.Web\PlanViewer.Web.csproj", "{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A06217BE-DBE2-47D0-BD59-93F2108D447C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanViewer.Core.Tests", "tests\PlanViewer.Core.Tests\PlanViewer.Core.Tests.csproj", "{399A69AD-0CD1-4E9B-9988-E94882B827E6}"
Expand Down Expand Up @@ -40,11 +42,16 @@ Global
{399A69AD-0CD1-4E9B-9988-E94882B827E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{399A69AD-0CD1-4E9B-9988-E94882B827E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{399A69AD-0CD1-4E9B-9988-E94882B827E6}.Release|Any CPU.Build.0 = Release|Any CPU
{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8904045D-E083-4010-A320-104B7466C044} = {21F75D2E-F228-49B3-825F-43F621760061}
{F1018F88-B289-40CE-852A-56478DFBA91E} = {21F75D2E-F228-49B3-825F-43F621760061}
{1504CE29-3CBF-4F0B-A46E-54644946B8ED} = {21F75D2E-F228-49B3-825F-43F621760061}
{B2D3F7A1-8C4E-4F5A-9D6B-1E2F3A4B5C6D} = {21F75D2E-F228-49B3-825F-43F621760061}
{399A69AD-0CD1-4E9B-9988-E94882B827E6} = {A06217BE-DBE2-47D0-BD59-93F2108D447C}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions src/PlanViewer.Web/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(Layout.MainLayout)">
<p>Page not found.</p>
</LayoutView>
</NotFound>
</Router>
26 changes: 26 additions & 0 deletions src/PlanViewer.Web/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@inherits LayoutComponentBase

<header>
<div class="header-content">
<img src="darling-data-logo.png" alt="Erik Darling Data" class="header-logo" />
<span class="header-divider"></span>
<span class="header-title">Performance Studio</span>
</div>
</header>

<main>
<ErrorBoundary>
<ChildContent>
@Body
</ChildContent>
<ErrorContent>
<p class="error-message">Something went wrong. Please refresh the page and try again.</p>
</ErrorContent>
</ErrorBoundary>
</main>

<footer>
<a href="https://www.erikdarling.com" target="_blank" rel="noopener">erikdarling.com</a>
<span class="footer-sep">&middot;</span>
<a href="https://github.com/erikdarlingdata/PerformanceStudio" target="_blank" rel="noopener">GitHub</a>
</footer>
Loading
Loading