Skip to content

Add DocFX metadata and build steps to workflow#49

Merged
Chris-Wolfgang merged 3 commits intomainfrom
develop
Dec 29, 2025
Merged

Add DocFX metadata and build steps to workflow#49
Chris-Wolfgang merged 3 commits intomainfrom
develop

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Added two steps to pr.yaml: one to generate DocFX metadata and another to build the DocFX site within the docfx_project directory. This automates documentation generation as part of the CI workflow.

Description

Fixes/Complete # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor

How Has This Been Tested?

  • Test A
  • Test B

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Additional context

Added two steps to pr.yaml: one to generate DocFX metadata and another to build the DocFX site within the docfx_project directory. This automates documentation generation as part of the CI workflow.
Copilot AI review requested due to automatic review settings December 28, 2025 19:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated documentation generation to the CI workflow by integrating DocFX metadata generation and site building steps into the pull request validation process.

Key Changes:

  • Added DocFX metadata generation step to extract API documentation from source code
  • Added DocFX site build step to compile the documentation into a static site

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pr.yaml Outdated
Comment on lines +210 to +214
run: dotnet docfx metadata docfx.json

- name: Build DocFX site
working-directory: docfx_project
run: dotnet docfx build docfx.json
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DocFX commands will fail because docfx is installed as a local tool (line 38-41) but is being invoked directly. When docfx is installed as a local tool using "dotnet tool install", it needs to be invoked using "dotnet tool run docfx" or just "dotnet docfx" instead of "dotnet docfx metadata" and "dotnet docfx build". The current commands should be changed to use the local tool properly.

Suggested change
run: dotnet docfx metadata docfx.json
- name: Build DocFX site
working-directory: docfx_project
run: dotnet docfx build docfx.json
run: dotnet tool run docfx metadata docfx.json
- name: Build DocFX site
working-directory: docfx_project
run: dotnet tool run docfx build docfx.json

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/pr.yaml Outdated
Comment on lines +208 to +212
- name: Generate DocFX metadata
working-directory: docfx_project
run: dotnet docfx metadata docfx.json

- name: Build DocFX site
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These DocFX steps will run on all OS matrix values (ubuntu-latest, windows-latest, macos-latest), which is inefficient and unnecessary since documentation only needs to be generated once. Consider adding an "if: runner.os == 'Windows'" or "if: runner.os == 'Linux'" condition to these steps to run them on only one platform, similar to how other steps in this workflow are conditionally executed.

Suggested change
- name: Generate DocFX metadata
working-directory: docfx_project
run: dotnet docfx metadata docfx.json
- name: Build DocFX site
- name: Generate DocFX metadata
if: runner.os == 'Windows'
working-directory: docfx_project
run: dotnet docfx metadata docfx.json
- name: Build DocFX site
if: runner.os == 'Windows'

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/pr.yaml Outdated
Comment on lines +209 to +213
working-directory: docfx_project
run: dotnet docfx metadata docfx.json

- name: Build DocFX site
working-directory: docfx_project
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These steps lack error handling. If the DocFX metadata generation or build fails, the entire workflow will fail. Consider adding "continue-on-error: true" to these steps, similar to how the test coverage steps (lines 93, 119) handle potential failures, especially since documentation generation is a non-critical part of PR validation.

Suggested change
working-directory: docfx_project
run: dotnet docfx metadata docfx.json
- name: Build DocFX site
working-directory: docfx_project
working-directory: docfx_project
continue-on-error: true
run: dotnet docfx metadata docfx.json
- name: Build DocFX site
working-directory: docfx_project
continue-on-error: true

Copilot uses AI. Check for mistakes.
Added if: runner.os == 'Windows' to the "Generate DocFX metadata" and "Build DocFX site" steps in pr.yaml, ensuring these steps execute only on Windows environments. This prevents execution on non-Windows runners where DocFX may not be supported.
Refactored pr.yaml to run on ubuntu-latest only, removing matrix OS strategy and consolidating build/test steps. Test projects are now auto-discovered and run in a loop with coverage collected for each. Coverage reporting and threshold checks are now bash-based for Linux compatibility. Artifact uploads and DevSkim security scans are streamlined and no longer OS-specific. Removed DocFX documentation build steps for a simpler, more maintainable workflow.
@Chris-Wolfgang Chris-Wolfgang merged commit 7417347 into main Dec 29, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants