Skip to content

Commit 4f1b4d5

Browse files
committed
Replace nginx with ASP.NET Core static file hosting
- Move Astro source files into astro/ subdirectory - Add ASP.NET Core app (Docs.Web) to serve Astro static output with caching, compression, trailing-slash redirects, and custom 404 handling - Add build.cs script with targets: astro-build, dotnet-build, container, aspire, link-check, verify-formatting, clean - Containerized Astro build (node:22-slim) for cross-platform consistency - Dockerfile-free container publishing via dotnet publish /t:PublishContainer targeting aspnet:10.0-alpine - Add .NET Aspire orchestrator (Docs.AppHost) for local dev - Remove Dockerfile, .dockerignore, deployment/ (nginx configs), build.sh
1 parent 25e87bc commit 4f1b4d5

436 files changed

Lines changed: 784 additions & 303 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v4
2023
with:
21-
submodules: true
22-
- name: build
23-
run: |
24-
docker build .
24+
dotnet-version: '10.0.x'
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '22'
30+
31+
- name: Build container
32+
run: dotnet build.cs container

.github/workflows/link-checker.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: "0 10 * * 0"
7-
#push:
8-
# branches:
9-
# - main
107
pull_request:
118
types: [opened, synchronize, reopened, closed]
129
branches:
@@ -21,21 +18,25 @@ jobs:
2118
issues: write
2219
name: Link Checker Job
2320
steps:
24-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
2525
with:
26-
submodules: true
27-
- name: Setup Node
26+
dotnet-version: '10.0.x'
27+
28+
- name: Setup Node.js
2829
uses: actions/setup-node@v4
2930
with:
30-
node-version: 22
31-
- name: Run build
32-
run: |
33-
echo $PWD
34-
./build.sh
31+
node-version: '22'
32+
33+
- name: Build Astro
34+
run: dotnet build.cs astro-build
35+
3536
- name: Link Checker
3637
uses: lycheeverse/lychee-action@v2
3738
env:
3839
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3940
with:
40-
args: "--header 'x-origin-verify: ${{ secrets.ORIGIN_VERIFICATION_HEADER_VALUE }}' --no-progress --max-concurrency 8 --skip-missing --accept 200,429 --exclude-path root/_llms-txt --exclude-path root/llms.txt --exclude-path root/llms-full.txt --exclude-path root/llms-small.txt --exclude-loopback --require-https --exclude sample.duendesoftware.com --exclude \"docs.duendesoftware.com/404\" --exclude sitemap --exclude \"https://github.com/DuendeArchive/IdentityModel.AspNetCore/\" --root-dir \"$PWD/root\" root/**"
41+
args: '--header ''x-origin-verify: ${{ secrets.ORIGIN_VERIFICATION_HEADER_VALUE }}'' --no-progress --max-concurrency 8 --skip-missing --accept 200,429 --exclude-path server/Docs.Web/wwwroot/_llms-txt --exclude-path server/Docs.Web/wwwroot/llms.txt --exclude-path server/Docs.Web/wwwroot/llms-full.txt --exclude-path server/Docs.Web/wwwroot/llms-small.txt --exclude-loopback --require-https --exclude sample.duendesoftware.com --exclude "docs.duendesoftware.com/404" --exclude sitemap --exclude "https://github.com/DuendeArchive/IdentityModel.AspNetCore/" --root-dir "$PWD/server/Docs.Web/wwwroot" server/Docs.Web/wwwroot/**'
4142
fail: true

.gitignore

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# build output
2-
dist/
3-
root/
1+
# Astro build output
2+
astro/dist/
3+
astro/root/
4+
server/Docs.Web/wwwroot/
5+
46
# generated types
5-
.astro/
7+
astro/.astro/
68

79
# dependencies
810
node_modules/
@@ -28,5 +30,41 @@ pnpm-debug.log*
2830
opencode.json
2931
.idea/**/copilot.data.migration.*.xml
3032

31-
# ides
33+
# .NET
34+
*.user
35+
*.suo
36+
*.userosscache
37+
*.sln.docstates
38+
[Bb]in/
39+
[Oo]bj/
40+
[Ll]og/
41+
[Ll]ogs/
3242
.vs/
43+
*.nupkg
44+
*.snupkg
45+
project.lock.json
46+
project.fragment.lock.json
47+
artifacts/
48+
49+
# Rider
50+
.idea/**/workspace.xml
51+
.idea/**/tasks.xml
52+
.idea/**/usage.statistics.xml
53+
.idea/**/dictionaries
54+
.idea/**/shelf
55+
56+
# User-specific files
57+
*.rsuser
58+
59+
# JetBrains Rider
60+
*.sln.iml
61+
62+
# ASP.NET Scaffolding
63+
ScaffoldingReadMe.txt
64+
65+
# Windows
66+
Thumbs.db
67+
ehthumbs.db
68+
69+
# Azure Functions
70+
local.settings.json

Dockerfile

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)