This project hosts the Slicer API documentation served from http://apidocs.slicer.org.
The Slicer API documentation is automatically generated and published using a GitHub workflow. The
generated files are pushed to the gh-pages
branch, which is configured as the source for
GitHub Pages.
The trigger-doxygen-build-and-publish.yml workflow in the Slicer/Slicer
repository initiates the process whenever:
- The
main
branch is updated. - A new release tag is pushed.
The slicer-apidocs-builder tool handles the generation and publication of documentation. It is invoked within the doxygen-build-and-publish.yml workflow maintained in this repository to:
- Check out the Slicer source code.
- Build the Doxygen documentation.
- Publish the generated HTML files.
- Main Branch Updates: Documentation for the
main
branch is added to themain
folder. - Release Tags: Documentation for new release tags is added to a folder named after the tag.
The updated content is pushed to the gh-pages
branch, ensuring the documentation remains current and accessible.
Over time, the size of the gh-pages
branch may exceed GitHub's recommended limit of 1GB.
To manage this, a scheduled workflow is configured to run weekly. This workflow executes
the gh-pages-squash.sh script, which performs the following actions:
- Executes a soft reset.
- Amends the first commit.
- Force-pushes the
gh-pages
branch.
This ensures that the repository size remains within the recommended limits.
You can manually trigger updates to the gh-pages
branch using the GitHub API. This is
useful for debugging or forcing a squash without waiting for the scheduled workflow.
- Generate GitHub token - See here
To trigger the squash workflow programmatically, run the following command:
GITHUB_TOKEN=<YOUR_GITHUB_TOKEN> ./trigger-workflow-squash.sh
It is covered by the Slicer License:
https://github.com/Slicer/apidocs.slicer.org/blob/main/License.txt