Skip to content

ci: auto-generate docs with Natural Docs + GitHub Pages#103

Merged
fank merged 3 commits intomainfrom
feat/natural-docs-ci
Mar 7, 2026
Merged

ci: auto-generate docs with Natural Docs + GitHub Pages#103
fank merged 3 commits intomainfrom
feat/natural-docs-ci

Conversation

@fank
Copy link
Copy Markdown
Member

@fank fank commented Mar 7, 2026

Summary

  • Adds Natural Docs v2 project configuration (NaturalDocs.Project/) with SQF language support
  • Adds GitHub Actions workflow that generates documentation from SQF source comments and deploys to GitHub Pages on push to main
  • Removes old static docs/ HTML (generated manually 3 years ago by Natural Docs v1.52)
  • Gitignores docs-output/ (CI-generated, never committed)

How it works

The workflow triggers on pushes to main when addons/** or NaturalDocs.Project/** change. It installs .NET 8 + Natural Docs 2.3.1, runs it against addons/, and deploys the output to GitHub Pages at https://ocap2.github.io/addon/.

Documentation is generated from the existing /* ... */ comment blocks in SQF files (27 of 48 files already have Natural Docs headers).

After merge

GitHub Pages source needs to be set to "GitHub Actions" in repo Settings > Pages. The first push to main after that will trigger the deployment.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's documentation process by automating the generation and deployment of API documentation. By integrating Natural Docs v2 with a GitHub Actions workflow, the project ensures that its documentation is consistently up-to-date and readily accessible via GitHub Pages, eliminating the need for manual updates and improving overall maintainability.

Highlights

  • Automated Documentation Generation: Implemented Natural Docs v2 project configuration, including support for the SQF language, to automate documentation generation.
  • CI/CD Integration: Introduced a GitHub Actions workflow to automatically generate and deploy documentation to GitHub Pages upon pushes to the 'main' branch.
  • Documentation Cleanup: Removed outdated, manually generated Natural Docs v1.52 HTML files from the 'docs/' directory.
  • Version Control Exclusion: Updated the '.gitignore' file to exclude the newly generated 'docs-output/' directory from version control.
Changelog
  • .gitignore
    • Added 'docs-output/' to prevent generated documentation from being committed.
  • NaturalDocs.Project/Languages.txt
    • Added configuration for SQF language support, specifying file extensions and comment syntax.
  • NaturalDocs.Project/Project.txt
    • Added core project configuration for Natural Docs, including title, subtitle, source folder, and output directory.
  • docs/files/extension/fnc_sendData-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/extension/script_component-hpp.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/main/XEH_preInit-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/main/script_component-hpp.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/main/script_macros-hpp.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/XEH_preInit-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_aceExplosives-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_addEventMission-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_addUnitEventHandlers-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_adminUIcontrol-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_captureLoop-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_connected-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_disconnected-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_firedMan-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_killed-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_onUserAdminStateChanged-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_eh_projectileHit-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_entityMonitors-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_exportData-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getAmmoMarkerData-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getClass-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getEventWeaponText-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getInstigator-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getUnitType-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_getWeaponDisplayData-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_handleCustomEvent-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_handleMarkers-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_init-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_isKindOfApc-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_projectileMonitors-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_startRecording-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_stopRecording-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/fnc_updateTime-sqf.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/files/recorder/script_component-hpp.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/CBAEvents.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/CBASettings.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/EventHandlers.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/Files.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/Functions.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/General.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/General2.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/Macros.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/index/Variables.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/javascript/main.js
    • Removed outdated Natural Docs v1.52 generated JavaScript file.
  • docs/javascript/prettify.js
    • Removed outdated Natural Docs v1.52 generated JavaScript file.
  • docs/javascript/searchdata.js
    • Removed outdated Natural Docs v1.52 generated JavaScript file.
  • docs/search/CBAEventsA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBAEventsC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBAEventsE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBAEventsH.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBAEventsP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBAEventsR.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsF.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsI.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsM.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsS.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/CBASettingsT.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersD.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersH.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersM.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersO.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/EventHandlersP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FilesC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FilesF.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FilesS.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsG.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsH.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsI.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsS.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/FunctionsU.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralB.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralD.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralF.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralG.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralH.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralI.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralL.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralM.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralN.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralO.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralR.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralS.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralT.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralU.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/GeneralV.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosB.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosL.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosS.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/MacrosV.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/NoResults.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesA.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesC.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesE.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesF.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesH.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesL.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesM.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesN.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesP.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesR.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesT.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/search/VariablesV.html
    • Removed outdated Natural Docs v1.52 generated HTML file.
  • docs/styles/main.css
    • Removed outdated Natural Docs v1.52 generated CSS file.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/docs.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request automates the documentation generation process by integrating Natural Docs with a GitHub Actions workflow. It removes the old, manually generated documentation from the docs/ directory and adds the necessary Natural Docs project configuration. The .gitignore file is updated to exclude the new documentation output directory. The changes look good and align with the goal of automating documentation deployment to GitHub Pages.

Note: Security Review did not run due to the size of the PR.

@fank fank merged commit e1a936a into main Mar 7, 2026
1 check passed
@fank fank deleted the feat/natural-docs-ci branch March 7, 2026 23:03
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.

1 participant