Skip to content

Commit 7465c0d

Browse files
committed
docs: add docfx
1 parent aa96916 commit 7465c0d

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 metadata docfx.json
36+
- run: docfx docfx.json
37+
38+
- name: Copy Metadata into Site Folder
39+
run: cp -r docfx-metadata/* docfx-site/docfx-metadata
40+
41+
- name: Upload site
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: 'docfx-site'
45+
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,5 @@ FodyWeavers.xsd
396396

397397
# JetBrains Rider
398398
*.sln.iml
399+
400+
docfx-output/

docfx.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
"CmlLib.Core.Commons.csproj"
10+
]
11+
}
12+
],
13+
"dest": "docfx-output/metadata",
14+
"outputFormat": "markdown"
15+
}
16+
],
17+
"build": {
18+
"content": [
19+
{
20+
"src": "docfx-output/metadata",
21+
"files": [
22+
"*.{md,yml}"
23+
],
24+
"exclude": [
25+
"docfx-output/site/**"
26+
],
27+
"dest": "api"
28+
}
29+
],
30+
"resource": [
31+
{
32+
"files": [
33+
"images/**"
34+
]
35+
}
36+
],
37+
"output": "docfx-output/site",
38+
"template": [
39+
"default",
40+
"modern"
41+
],
42+
"globalMetadata": {
43+
"_appName": "CmlLib.Core.Commons",
44+
"_appTitle": "CmlLib.Core.Commons",
45+
"_enableSearch": true,
46+
"pdf": false
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)