Skip to content

Commit e69f937

Browse files
committed
updated metadata action and dependent workflow
1 parent b2bfe81 commit e69f937

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ inputs:
99
docfx-json-manifest:
1010
description: 'Path to the docfx JSON manifest file'
1111
required: true
12+
temporary-directory:
13+
description: 'Temporary directory for docfx metadata generation'
14+
required: true
1215
output-directory:
1316
description: 'Target directory for generated documentation'
1417
required: true
@@ -33,8 +36,8 @@ runs:
3336
- name: 'Delete temporary folder'
3437
shell: bash
3538
run: |
36-
if [ -d "temp" ]; then
37-
rm -rf temp
39+
if [ -d "${{ inputs.output-directory }}" ]; then
40+
rm -rf "${{ inputs.output-directory }}"
3841
fi
3942
- name: 'Generate documentation'
4043
run: docfx metadata ${{ inputs.docfx-json-manifest }}
@@ -43,14 +46,8 @@ runs:
4346
shell: bash
4447
run: |
4548
mkdir -p "${{ inputs.output-directory }}"
46-
cp -r temp/* "${{ inputs.output-directory }}"
49+
cp -r "${{ inputs.output-directory }}" "${{ inputs.output-directory }}"
4750
- name: 'Delete temporary folder'
48-
- name: 'Delete temporary folder'
49-
shell: bash
50-
run: |
51-
if [ -d "temp" ]; then
52-
rm -rf temp
53-
fi
5451
- name: Upload artifact
5552
uses: actions/upload-artifact@v4
5653
with:

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ jobs:
222222
with:
223223
artifact-name: 'assembly-metadata'
224224
docfx-json-manifest: './api-reference/assembly-metadata.json'
225+
temporary-directory: './api-reference/temp/'
225226
output-directory: './api-reference/${{ env.friendly-version }}/'
226227
- name: 'Push documentation to ${{ github.head_ref || github.ref }} branch'
227228
uses: ./.github/actions/push-changes

0 commit comments

Comments
 (0)