Skip to content

Commit e7c51ae

Browse files
lassoanclaude
andcommitted
Generate C++ API docs at Pages deploy time instead of committing them
Remove doc/html, the static Doxygen output hand-committed during the 2018 JOSS review and never regenerated since. Replace it with a GitHub Actions Pages workflow (pages-deploy.yml) that, on every deploy, shallow-clones vmtk at each published ref, runs Doxygen directly against vtkVmtk/Utilities/Doxygen/doxyfile.in (no VTK/ITK build required, doxygen only parses headers as text), and copies the output into documentation/api/<folder>/ alongside the Jekyll-built site -- master maps to documentation/api/latest/, 1.4 to documentation/api/1.4/. No generated HTML is ever stored in this repo's history, and no cross-repo credentials are needed since vmtk is a public repo. Also adds documentation/api/index.html as a version switcher and repoints the "C++ scripts" link on the documentation page at it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent ac61c9f commit e7c51ae

2,814 files changed

Lines changed: 102 additions & 308200 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages-deploy.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Deploy website and API documentation
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
schedule:
7+
# Rebuild periodically so the C++ API reference picks up changes pushed
8+
# to the vmtk repo even when nothing changes here.
9+
- cron: '0 6 * * *'
10+
workflow_dispatch: {}
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout website source
26+
uses: actions/checkout@v4
27+
28+
- name: Install Doxygen and Graphviz
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y doxygen graphviz
32+
33+
- name: Build Jekyll site
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./
37+
destination: ./_site
38+
39+
# The C++ API reference is never committed to this repo. It is
40+
# generated fresh, straight from vtkVmtk headers in the vmtk repo,
41+
# every time the site is deployed. To publish another version, add a
42+
# "[ref]=folder" entry below -- e.g. [1.6]=1.6 once that branch exists.
43+
- name: Build versioned API documentation
44+
run: |
45+
set -e
46+
declare -A VERSIONS=( [master]=latest [1.4]=1.4 )
47+
for ref in "${!VERSIONS[@]}"; do
48+
folder="${VERSIONS[$ref]}"
49+
echo "::group::Building API docs for vmtk@${ref} -> documentation/api/${folder}"
50+
51+
src="${RUNNER_TEMP}/vmtk-src-${folder}"
52+
git clone --depth 1 --branch "${ref}" https://github.com/vmtk/vmtk.git "${src}"
53+
54+
doxyfile="${RUNNER_TEMP}/Doxyfile-${folder}"
55+
build_dir="${RUNNER_TEMP}/doxygen-build-${folder}"
56+
mkdir -p "${build_dir}/Utilities/Doxygen/doc"
57+
sed \
58+
-e "s#@VTK_VMTK_SOURCE_DIR@#${src}/vtkVmtk#g" \
59+
-e "s#@VTK_VMTK_BINARY_DIR@#${build_dir}#g" \
60+
-e "s#@DOXYGEN_DOT_PATH@#$(dirname "$(command -v dot)")#g" \
61+
"${src}/vtkVmtk/Utilities/Doxygen/doxyfile.in" > "${doxyfile}"
62+
63+
doxygen "${doxyfile}"
64+
65+
mkdir -p "_site/documentation/api/${folder}"
66+
cp -r "${build_dir}/Utilities/Doxygen/doc/html/." "_site/documentation/api/${folder}/"
67+
echo "::endgroup::"
68+
done
69+
70+
- name: Upload Pages artifact
71+
uses: actions/upload-pages-artifact@v3
72+
with:
73+
path: _site
74+
75+
deploy:
76+
needs: build
77+
runs-on: ubuntu-latest
78+
environment:
79+
name: github-pages
80+
url: ${{ steps.deployment.outputs.page_url }}
81+
steps:
82+
- name: Deploy to GitHub Pages
83+
id: deployment
84+
uses: actions/deploy-pages@v4

doc/html/ComputationalGeometry_2vtkvmtkPolyDataBoundaryExtractor_8h.html

Lines changed: 0 additions & 99 deletions
This file was deleted.

doc/html/ComputationalGeometry_2vtkvmtkPolyDataBoundaryExtractor_8h__incl.map

Lines changed: 0 additions & 2 deletions
This file was deleted.

doc/html/ComputationalGeometry_2vtkvmtkPolyDataBoundaryExtractor_8h__incl.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/html/ComputationalGeometry_2vtkvmtkPolyDataBoundaryExtractor_8h__incl.svg

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)