Skip to content

Commit 82b4017

Browse files
committed
ci: Add GitHub Workflow to build and publish documentation
1 parent 7714c1a commit 82b4017

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/build-doxygen.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build and Publish
2+
3+
on:
4+
# Allows running this workflow manually from the Actions tab
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "Version of Slicer documentation to build and publish"
9+
required: true
10+
11+
jobs:
12+
build-and-publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Collect Inputs
16+
id: collect_inputs
17+
run: |
18+
echo "EVENT_NAME [$EVENT_NAME]"
19+
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
20+
version=${{ github.event.inputs.version }}
21+
else
22+
echo "::error ::Unsupported EVENT_NAME [$EVENT_NAME]"
23+
exit 1
24+
fi
25+
echo "version=$version" >> $GITHUB_OUTPUT
26+
env:
27+
EVENT_NAME: ${{ github.event_name }}
28+
29+
- uses: actions/checkout@v4
30+
with:
31+
ref: gh-pages
32+
path: gh-pages
33+
34+
- uses: actions/checkout@v4
35+
with:
36+
repository: jcfr/Slicer
37+
path: Slicer
38+
ref: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }}
39+
40+
- uses: ssciwr/doxygen-install@v1
41+
with:
42+
version: "1.10.0"
43+
44+
45+
- uses: actions/checkout@v4
46+
with:
47+
repository: Slicer/slicer-apidocs-builder
48+
path: slicer-apidocs-builder
49+
ref: 1744509e91fa66186d34e4c6968ee684131c51d1
50+
51+
- uses: actions/setup-python@v5
52+
with:
53+
python-version: '3.13'
54+
cache: 'pip'
55+
56+
- name: Install slicer-apidocs-builder
57+
run: |
58+
pip install ./slicer-apidocs-builder
59+
60+
- name: Build
61+
run: |
62+
slicer-apidocs-builder \
63+
--slicer-repo-dir Slicer \
64+
--slicer-repo-branch $SLICER_BRANCH \
65+
--skip-publish
66+
env:
67+
SLICER_BRANCH: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }}
68+

0 commit comments

Comments
 (0)