Skip to content

Commit ed396fa

Browse files
authored
docs: add API reference publishing with DocFX (#63)
2 parents 0dd4b59 + bee6646 commit ed396fa

14 files changed

Lines changed: 163 additions & 301 deletions

.github/workflows/pr-check.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ jobs:
4747
- name: Check dependency health
4848
run: python3 -m scripts.dependencies.check_package_health --solution ModularityKit.Mutator.slnx
4949

50+
docs:
51+
name: docs
52+
runs-on: ubuntu-latest
53+
needs: build
54+
55+
steps:
56+
- uses: actions/checkout@v5
57+
58+
- uses: actions/setup-dotnet@v5
59+
with:
60+
dotnet-version: 10.0.x
61+
62+
- name: Install DocFX
63+
run: dotnet tool update -g docfx
64+
65+
- name: Build docs
66+
run: docfx docfx.json
67+
5068
tests:
5169
name: ${{ matrix.name }}
5270
runs-on: ubuntu-latest
@@ -177,6 +195,7 @@ jobs:
177195
needs:
178196
- build
179197
- dependency-health
198+
- docs
180199
- tests
181200
- examples-core
182201
- examples-governance
@@ -188,13 +207,15 @@ jobs:
188207
run: |
189208
echo "build: ${{ needs.build.result }}"
190209
echo "dependency-health: ${{ needs.dependency-health.result }}"
210+
echo "docs: ${{ needs.docs.result }}"
191211
echo "tests: ${{ needs.tests.result }}"
192212
echo "examples-core: ${{ needs.examples-core.result }}"
193213
echo "examples-governance: ${{ needs.examples-governance.result }}"
194214
echo "examples-governance-redis: ${{ needs.examples-governance-redis.result }}"
195215
196216
if [ "${{ needs.build.result }}" != "success" ] || \
197217
[ "${{ needs.dependency-health.result }}" != "success" ] || \
218+
[ "${{ needs.docs.result }}" != "success" ] || \
198219
[ "${{ needs.tests.result }}" != "success" ] || \
199220
[ "${{ needs.examples-core.result }}" != "success" ] || \
200221
[ "${{ needs.examples-governance.result }}" != "success" ] || \

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea/
22
bin/
33
obj/
4+
_site/
45
__pycache__/
56
*.pyc

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
3+
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
44
</PropertyGroup>
55
</Project>

Docs/API/API-Reference.md

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

Docs/API/Redis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ in-memory provider.
132132

133133
- [`src/Redis/README.md`](../../src/Redis/README.md)
134134
- [`Examples/Governance/RedisQueries/README.md`](../../Examples/Governance/RedisQueries/README.md)
135-
- [`API-Reference.md`](API-Reference.md)
135+
- [`Reference.md`](Reference.md)
136136
- [Governance API](API.md)

Docs/API/Reference.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# API Reference
2+
3+
DocFX generates the public API reference from the compiled assemblies and XML documentation files.
4+
5+
## Included packages
6+
7+
- `ModularityKit.Mutator`
8+
- `ModularityKit.Mutator.Governance`
9+
- `ModularityKit.Mutator.Governance.Redis`
10+
11+
## Build locally
12+
13+
```bash
14+
dotnet tool update -g docfx
15+
docfx docfx.json
16+
```
17+
18+
The rendered API pages appear under the `API` section of the generated site.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,15 @@ python3 -m scripts.dependencies.check_package_health --solution ModularityKit.Mu
3636
```
3737

3838
The check reports vulnerable packages as a failing condition and prints outdated packages for review. When a package needs attention, update the affected `PackageReference` version in the owning project and rerun the check.
39+
40+
## Documentation
41+
42+
Build the DocFX site locally with:
43+
44+
```bash
45+
dotnet tool update -g docfx
46+
docfx docfx.json
47+
```
48+
49+
The generated site includes the conceptual docs under `Docs/` and the public API reference for the
50+
three published packages.

0 commit comments

Comments
 (0)