Skip to content

Commit 3beda91

Browse files
committed
feat: Implement DocFX for documentation generation and GitHub Pages deployment, including configuration, TOC files, and workflow.
1 parent 1c53bc8 commit 3beda91

6 files changed

Lines changed: 176 additions & 11 deletions

File tree

.github/workflows/docs.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: 9.0.x
29+
30+
- name: Install DocFX
31+
run: dotnet tool update -g docfx
32+
33+
- name: Build docs
34+
run: docfx docfx.json
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: _site
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,3 +485,7 @@ $RECYCLE.BIN/
485485

486486
# Vim temporary swap files
487487
*.swp
488+
489+
# DocFX site
490+
_site/
491+
api/

docfx.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"src/**/*.csproj"
8+
],
9+
"exclude": [
10+
"**/obj/**",
11+
"**/bin/**",
12+
"**/*.Tests/**",
13+
"**/BookStore.Web/**",
14+
"**/BookStore.AppHost/**"
15+
]
16+
}
17+
],
18+
"dest": "api",
19+
"disableGitFeatures": false,
20+
"disableDefaultFilter": false
21+
}
22+
],
23+
"build": {
24+
"content": [
25+
{
26+
"files": [
27+
"api/**.yml",
28+
"api/index.md"
29+
]
30+
},
31+
{
32+
"files": [
33+
"docs/**.md",
34+
"docs/**/toc.yml",
35+
"toc.yml",
36+
"*.md",
37+
"LICENSE"
38+
],
39+
"exclude": [
40+
"obj/**",
41+
"_site/**",
42+
"**/bin/**",
43+
"**/obj/**"
44+
]
45+
}
46+
],
47+
"resource": [
48+
{
49+
"files": [
50+
"images/**"
51+
]
52+
}
53+
],
54+
"overwrite": [
55+
{
56+
"files": [
57+
"apidoc/**.md",
58+
"apidoc/**/toc.yml"
59+
],
60+
"exclude": [
61+
"obj/**",
62+
"_site/**"
63+
]
64+
}
65+
],
66+
"dest": "_site",
67+
"globalMetadataFiles": [],
68+
"fileMetadataFiles": [],
69+
"template": [
70+
"default",
71+
"modern"
72+
],
73+
"postProcessors": [],
74+
"markdownEngineName": "markdig",
75+
"noLangKeyword": false,
76+
"keepFileLink": false,
77+
"cleanupCacheHistory": false,
78+
"disableGitFeatures": false
79+
}
80+
}

docs/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ Welcome to the Book Store API documentation. This is an event-sourced book store
66

77
- [Getting Started](getting-started.md)
88
- [Architecture Overview](architecture.md)
9-
- [API Reference](api-reference.md)
10-
- [Event Sourcing Guide](event-sourcing.md)
9+
- [API Reference](../api/index.md)
10+
- [Event Sourcing Guide](event-sourcing-guide.md)
1111
- [Wolverine Integration](wolverine-guide.md)
1212
- [Correlation & Causation IDs](correlation-causation-guide.md)
1313
- [ETag Support](etag-guide.md)
14-
- [Localization](localization.md)
15-
- [Deployment](deployment.md)
14+
- [Localization](localization-guide.md)
1615

1716
## 🚀 Quick Start
1817

@@ -67,20 +66,16 @@ BookStore/
6766

6867
- **[Getting Started](getting-started.md)** - Setup and first steps
6968
- **[Architecture Overview](architecture.md)** - System design and patterns
70-
- **[Event Sourcing Guide](event-sourcing.md)** - Understanding the event store
71-
- **[API Reference](api-reference.md)** - Complete endpoint documentation
69+
- **[Event Sourcing Guide](event-sourcing-guide.md)** - Understanding the event store
70+
- **[API Reference](../api/index.md)** - Complete endpoint documentation
7271

7372
### For API Consumers
7473

75-
- **[API Reference](api-reference.md)** - All available endpoints
74+
- **[API Reference](../api/index.md)** - All available endpoints
7675
- **[ETag Support](etag-guide.md)** - Optimistic concurrency and caching
7776
- **[Correlation & Causation IDs](correlation-causation-guide.md)** - Distributed tracing
7877
- **[Localization Guide](localization-guide.md)** - Multi-language support and configuration
7978

80-
### For Operations
81-
82-
- **[Deployment](deployment.md)** - Production deployment guide
83-
- **[Monitoring](monitoring.md)** - Observability and health checks
8479

8580
## 🔗 Quick Links
8681

docs/toc.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
- name: Getting Started
2+
href: getting-started.md
3+
- name: Architecture
4+
href: architecture.md
5+
- name: Guides
6+
items:
7+
- name: Marten
8+
href: marten-guide.md
9+
- name: Wolverine
10+
href: wolverine-guide.md
11+
- name: SignalR
12+
href: signalr-guide.md
13+
- name: Event Sourcing
14+
href: event-sourcing-guide.md
15+
- name: Testing
16+
href: testing-guide.md
17+
- name: Performance
18+
href: performance-guide.md
19+
- name: Localization
20+
href: localization-guide.md
21+
- name: ETag
22+
href: etag-guide.md
23+
- name: Correlation & Causation
24+
href: correlation-causation-guide.md
25+
- name: Time Standards
26+
href: time-standards.md
27+
- name: Rules
28+
items:
29+
- name: Analyzer Rules
30+
href: analyzer-rules.md

toc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: Home
2+
href: README.md
3+
- name: Documentation
4+
href: docs/
5+
- name: API Reference
6+
href: api/

0 commit comments

Comments
 (0)