Skip to content

Commit e8265fc

Browse files
committed
updated docfx
1 parent a4ceed6 commit e8265fc

File tree

8 files changed

+157
-70
lines changed

8 files changed

+157
-70
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -174,45 +174,45 @@ jobs:
174174
nuget-feed-server: 'NuGet'
175175
environment: 'NuGet'
176176

177-
benchmark:
178-
if: ${{ github.env.is_release || vars.BENCHMARKDOTNET_RUN_OVERRIDE == 'true' }}
179-
name: Benchmark with .NET CLI on ${{ matrix.os }}
180-
needs: [build]
181-
strategy:
182-
matrix:
183-
os: [ubuntu-latest, windows-latest, macos-latest]
184-
runs-on: ${{ matrix.os }}
185-
steps:
186-
- name: 'Checkout ${{ github.head_ref || github.ref }}'
187-
uses: actions/checkout@v4
188-
- name: Install .NET SDK
189-
uses: actions/setup-dotnet@v4
190-
with:
191-
dotnet-version: |
192-
8.x
193-
9.x
194-
- name: Download Build
195-
uses: actions/download-artifact@v4
196-
with:
197-
name: build
198-
- name: Benchmark
199-
working-directory: ${{ vars.BENCHMARKDOTNET_WORKING_DIRECTORY }}
200-
run: dotnet run --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} --framework ${{ vars.DEFAULT_BUILD_FRAMEWORK }} --runtimes ${{ vars.BENCHMARKDOTNET_RUNTIMES }} --filter ${{ vars.BENCHMARKDOTNET_FILTER }} --artifacts ${{ runner.temp }}/benchmarks/ --exporters GitHub --memory --iterationTime 100 --join
201-
- name: Upload Benchmark Results
202-
uses: actions/upload-artifact@v4
203-
with:
204-
name: benchmark-${{ matrix.os }}
205-
path: |
206-
${{ runner.temp }}/benchmarks/**/*-report-github.md
207-
- name: Write Benchmark Summary
208-
shell: bash
209-
run: cat **/*-report-github.md > $GITHUB_STEP_SUMMARY
210-
working-directory: ${{ runner.temp }}/benchmarks/
177+
# benchmark:
178+
# if: ${{ github.env.is_release || vars.BENCHMARKDOTNET_RUN_OVERRIDE == 'true' }}
179+
# name: Benchmark with .NET CLI on ${{ matrix.os }}
180+
# needs: [build]
181+
# strategy:
182+
# matrix:
183+
# os: [ubuntu-latest, windows-latest, macos-latest]
184+
# runs-on: ${{ matrix.os }}
185+
# steps:
186+
# - name: 'Checkout ${{ github.head_ref || github.ref }}'
187+
# uses: actions/checkout@v4
188+
# - name: Install .NET SDK
189+
# uses: actions/setup-dotnet@v4
190+
# with:
191+
# dotnet-version: |
192+
# 8.x
193+
# 9.x
194+
# - name: Download Build
195+
# uses: actions/download-artifact@v4
196+
# with:
197+
# name: build
198+
# - name: Benchmark
199+
# working-directory: ${{ vars.BENCHMARKDOTNET_WORKING_DIRECTORY }}
200+
# run: dotnet run --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} --framework ${{ vars.DEFAULT_BUILD_FRAMEWORK }} --runtimes ${{ vars.BENCHMARKDOTNET_RUNTIMES }} --filter ${{ vars.BENCHMARKDOTNET_FILTER }} --artifacts ${{ runner.temp }}/benchmarks/ --exporters GitHub --memory --iterationTime 100 --join
201+
# - name: Upload Benchmark Results
202+
# uses: actions/upload-artifact@v4
203+
# with:
204+
# name: benchmark-${{ matrix.os }}
205+
# path: |
206+
# ${{ runner.temp }}/benchmarks/**/*-report-github.md
207+
# - name: Write Benchmark Summary
208+
# shell: bash
209+
# run: cat **/*-report-github.md > $GITHUB_STEP_SUMMARY
210+
# working-directory: ${{ runner.temp }}/benchmarks/
211211

212212
publish-docs:
213213
# if: ${{ github.env.is_release && !github.env.is_preview }}
214214
name: Docs with docfx
215-
needs: [benchmark, test]
215+
# needs: [publish-production-package]
216216
environment:
217217
name: github-pages
218218
url: ${{ steps.deployment.outputs.page_url }}
@@ -224,28 +224,18 @@ jobs:
224224
uses: actions/setup-dotnet@v4
225225
with:
226226
dotnet-version: ${{ env.dotnet-sdk-version }}
227-
- name: Download Benchmarks
228-
uses: actions/download-artifact@v4
229-
with:
230-
pattern: benchmark-*
231-
path: ${{ runner.temp }}/benchmarks/
232-
merge-multiple: false
233-
- run: |
234-
echo -e '\n## Windows' >> ${{ github.workspace}}/docfx/benchmarks/index.md
235-
cat benchmark-windows-latest/**/*.md >> ${{ github.workspace}}/docfx/benchmarks/index.md
236-
echo -e '\n## Linux' >> ${{ github.workspace}}/docfx/benchmarks/index.md
237-
cat benchmark-ubuntu-latest/**/*.md >> ${{ github.workspace}}/docfx/benchmarks/index.md
238-
echo -e '\n## macOS' >> ${{ github.workspace}}/docfx/benchmarks/index.md
239-
cat benchmark-macos-latest/**/*.md >> ${{ github.workspace}}/docfx/benchmarks/index.md
240-
working-directory: ${{ runner.temp }}/benchmarks/
241227
- run: dotnet tool update -g docfx
242-
- run: docfx ./docfx/docfx.json
228+
- run: docfx ./docfx/api-reference.json
229+
- run: |
230+
mkdir -p ./docs/${ env.assembly-version }
231+
cp -r ./docs/ ./docs/${ env.assembly-version }
243232
- run: |
233+
git checkout docs
244234
git config --global user.email "action@github.com"
245235
git config --global user.name "GitHub Action"
246-
git add -- ./docs
247-
git commit -m'updated docs:${{ env.assembly-version }}' -- ./docs
248-
git push --force origin ${{ github.head_ref || github.ref }}
236+
git add -- ./docs/${ env.assembly-version }
237+
git commit -m'added ./docs/${ env.assembly-version }' -- ./docs/${ env.assembly-version }
238+
git push --force origin docs
249239
- name: Upload artifact
250240
uses: actions/upload-pages-artifact@v3
251241
with:

docfx/api-reference.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3+
"metadata": [
4+
{
5+
"src": [
6+
{
7+
"src": "../src",
8+
"files": [
9+
"**/*.csproj"
10+
]
11+
}
12+
],
13+
"dest": "api-reference"
14+
}
15+
],
16+
"build": {
17+
"resource": [
18+
{
19+
"files": [
20+
"media/**",
21+
"favicon.ico"
22+
]
23+
}
24+
],
25+
"output": "../docs",
26+
"template": [
27+
"default",
28+
"modern"
29+
],
30+
"globalMetadata": {
31+
"_appName": " Polyline Algorithm for .NET",
32+
"_appTitle": "Polyline Algorithm for .NET",
33+
"_appFooter": "",
34+
"_appFaviconPath": "favicon.ico",
35+
"_appLogoPath": "media/polyline-algorithm-50x46.png",
36+
"_enableSearch": true,
37+
"_enableNewTab": true,
38+
"_disableNavbar": false,
39+
"_disableBreadcrumb": false,
40+
"_disableToc": false,
41+
"_disableAffix": false,
42+
"_disableContribution": true,
43+
"pdf": true
44+
},
45+
"sitemap": {
46+
"baseUrl": "https://petesramek.github.io/polyline-algorithm-csharp/",
47+
"priority": 0.1,
48+
"changefreq": "monthly"
49+
}
50+
}
51+
}

docfx/benchmarks/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docfx/benchmarks/toc.yml

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

docfx/docfx.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3-
"metadata": [
4-
{
5-
"src": [
6-
{
7-
"src": "../src",
8-
"files": [
9-
"**/*.csproj"
10-
]
11-
}
12-
],
13-
"dest": "api-reference"
14-
}
15-
],
163
"build": {
174
"content": [
185
{

docfx/global.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3+
"metadata": [
4+
{
5+
"src": [
6+
{
7+
"src": "../src",
8+
"files": [
9+
"**/*.csproj"
10+
]
11+
}
12+
],
13+
"dest": "api-reference"
14+
}
15+
],
16+
"build": {
17+
"content": [
18+
{
19+
"files": "**/*.{md,yml}",
20+
"exclude": [
21+
"docs/**"
22+
]
23+
}
24+
],
25+
"resource": [
26+
{
27+
"files": [
28+
"media/**",
29+
"favicon.ico"
30+
]
31+
}
32+
],
33+
"output": "../docs",
34+
"template": [
35+
"default",
36+
"modern"
37+
],
38+
"globalMetadata": {
39+
"_appName": " Polyline Algorithm for .NET",
40+
"_appTitle": "Polyline Algorithm for .NET",
41+
"_appFooter": "",
42+
"_appFaviconPath": "favicon.ico",
43+
"_appLogoPath": "media/polyline-algorithm-50x46.png",
44+
"_enableSearch": true,
45+
"_enableNewTab": true,
46+
"_disableNavbar": false,
47+
"_disableBreadcrumb": false,
48+
"_disableToc": false,
49+
"_disableAffix": false,
50+
"_disableContribution": true,
51+
"pdf": true
52+
},
53+
"sitemap": {
54+
"baseUrl": "https://petesramek.github.io/polyline-algorithm-csharp/",
55+
"priority": 0.1,
56+
"changefreq": "monthly"
57+
}
58+
}
59+
}

docfx/guide/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Index

docfx/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
- name: API reference
22
href: api-reference/
33
- name: Benchmarks
4-
href: benchmarks/index.md
4+
href: benchmarks/index.md
5+
- name: Guides
6+
href: guide/index.md

0 commit comments

Comments
 (0)