Skip to content

Commit cb0f7af

Browse files
committed
updated docs gen
1 parent 971b8ab commit cb0f7af

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/actions/docfx-metadata/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ author: 'Pete Sramek'
33
description: 'Generate metadata using docfx'
44
inputs:
55
# Required
6+
artifact-name:
7+
description: 'Name of the artifact to upload after generating documentation'
8+
required: true
69
docfx-json-manifest:
710
description: 'Path to the docfx JSON manifest file'
811
required: true
@@ -29,4 +32,9 @@ runs:
2932
shell: bash
3033
- name: 'Generate documentation'
3134
run: docfx metadata ${{ inputs.docfx-json-manifest }} --output ./api-reference/${{ inputs.assembly-version }}
32-
shell: bash
35+
shell: bash
36+
- name: Upload artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: ${{ inputs.artifact-name }}
40+
path: ${{ inputs.output-directory }}

.github/actions/push-changes/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ inputs:
1212
commit-message:
1313
description: 'The commit message to use when pushing changes.'
1414
required: true
15+
artifact-name:
16+
description: 'Name of the artifact to download before pushing changes.'
17+
required: true
1518
# Optional
1619
dotnet_sdk_version:
1720
description: '.NET SDK version. Default: 9.x'
1821
required: false
1922
default: '9.x'
20-
artifact-name:
21-
description: 'Name of the artifact to download before pushing changes.'
22-
required: false
2323
force-checkout:
2424
description: 'Force checkout the target branch, discarding local changes.'
2525
required: false
@@ -34,7 +34,6 @@ runs:
3434
with:
3535
dotnet-version: ${{ env.dotnet-sdk-version }}
3636
- name: Download a single artifact
37-
if: ${{ inputs.artifact-name != '' }}
3837
uses: actions/download-artifact@v4
3938
with:
4039
name: ${{ inputs.artifact-name }}

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,26 +214,29 @@ jobs:
214214
- name: 'Generate assembly metadata'
215215
uses: ./.github/actions/docfx-metadata
216216
with:
217+
artifact-name: 'assembly-metadata'
217218
docfx-json-manifest: './api-reference/assembly-metadata.json'
218219
assembly-version: ${{ needs.versioning.outputs.friendly-version }}
219220
target-directory: './api-reference/${{ env.friendly-version }}/'
220221
- name: 'Push documentation to ${{ github.head_ref || github.ref }} branch'
221222
uses: ./.github/actions/push-changes
222223
with:
224+
artifact-name: 'assembly-metadata'
223225
working-directory: './api-reference/'
224226
target-branch: ${{ github.head_ref || github.ref }}
225227
commit-message: 'Update docs for version ${{ env.friendly-version }}'
226228
force: false
227-
- name: 'Generate assembly metadata'
229+
- name: 'Generate documentation'
228230
uses: ./.github/actions/docfx-build
229231
with:
232+
artifact-name: 'documentation'
230233
docfx-json-manifest: './api-reference/api-reference.json'
231234
assembly-version: ${{ needs.versioning.outputs.friendly-version }}
232-
target-directory: './api-reference/${{ env.friendly-version }}/'
235+
output-directory: './api-reference/'
233236
- name: Upload artifact
234237
uses: actions/upload-pages-artifact@v3
235238
with:
236-
path: './docs'
239+
path: './api-reference/_docs'
237240
- name: Deploy to GitHub Pages
238241
id: deployment
239242
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)