-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add GitHub Workflow to build and publish documentation
- Loading branch information
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build and Publish | ||
|
||
on: | ||
# Allows running this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version of Slicer documentation to build and publish" | ||
required: true | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Collect Inputs | ||
id: collect_inputs | ||
run: | | ||
echo "EVENT_NAME [$EVENT_NAME]" | ||
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then | ||
version=${{ github.event.inputs.version }} | ||
else | ||
echo "::error ::Unsupported EVENT_NAME [$EVENT_NAME]" | ||
exit 1 | ||
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: jcfr/Slicer | ||
path: Slicer | ||
ref: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }} | ||
|
||
- uses: ssciwr/doxygen-install@v1 | ||
with: | ||
version: "1.10.0" | ||
|
||
# The "dot" binary is provided by Graphviz | ||
- name: Setup Graphviz | ||
uses: ts-graphviz/setup-graphviz@v2 | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: Slicer/slicer-apidocs-builder | ||
path: slicer-apidocs-builder | ||
ref: 1744509e91fa66186d34e4c6968ee684131c51d1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
cache: 'pip' | ||
|
||
- name: Install slicer-apidocs-builder | ||
run: | | ||
pip install ./slicer-apidocs-builder | ||
- name: Build | ||
run: | | ||
slicer-apidocs-builder \ | ||
--slicer-repo-dir Slicer \ | ||
--slicer-repo-branch $SLICER_BRANCH \ | ||
--skip-publish | ||
env: | ||
SLICER_BRANCH: speedup-doxygen-generation # ${{ steps.collect_inputs.outputs.version }} | ||
|