Skip to content

Commit f9fb416

Browse files
committed
docs: add docfx
1 parent b65db1e commit f9fb416

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

.github/ISSUE_TEMPLATE/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Your GitHub workflow file under .github/workflows/
2+
# Trigger the action on push to main
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
actions: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
publish-docs:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Dotnet Setup
30+
uses: actions/setup-dotnet@v3
31+
with:
32+
dotnet-version: 8.x
33+
34+
- run: dotnet tool update -g docfx
35+
- run: docfx docfx.json
36+
37+
- name: Upload site
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: '_site'
41+
42+
- name: Upload metadata
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: 'api'
46+
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,7 @@ __pycache__/
262262

263263
./release
264264
benchmark/BenchmarkDotNet.Artifacts/
265+
266+
# DocFX
267+
api
268+
_site

docfx.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3+
"metadata": [
4+
{
5+
"src": [
6+
{
7+
"src": ".",
8+
"files": [
9+
"src/CmlLib.Core.csproj"
10+
]
11+
}
12+
],
13+
"dest": "api",
14+
"outputFormat": "markdown"
15+
}
16+
],
17+
"build": {
18+
"content": [
19+
{
20+
"files": [
21+
"**/*.{md,yml}"
22+
],
23+
"exclude": [
24+
"_site/**"
25+
]
26+
}
27+
],
28+
"resource": [
29+
{
30+
"files": [
31+
"images/**"
32+
]
33+
}
34+
],
35+
"output": "_site",
36+
"template": [
37+
"default",
38+
"modern"
39+
],
40+
"globalMetadata": {
41+
"_appName": "CmlLib.Core",
42+
"_appTitle": "CmlLib.Core",
43+
"_enableSearch": true,
44+
"pdf": false
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)