diff --git a/.github/workflows/ctest.yml b/.github/workflows/ctest.yml index df552cff841..54f2bd66d9e 100644 --- a/.github/workflows/ctest.yml +++ b/.github/workflows/ctest.yml @@ -540,6 +540,21 @@ jobs: path: ${{ runner.workspace }}/buildrpm/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2404_gcc.rpm if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + # Verify the Doxygen tag file was generated inside the HTML output + # directory so it is captured by the docs-doxygen artifact below and + # published alongside the HTML documentation (e.g., to + # https://support.hdfgroup.org/documentation/hdf5/latest/hdf5.tag). + - name: Verify hdf5.tag is present (Linux) + env: + TAG_FILE: ${{ runner.workspace }}/hdf5/build/${{ steps.run-ctest.outputs.ACTIVE_PRESET }}/hdf5lib_docs/html/hdf5.tag + run: | + if [ ! -f "$TAG_FILE" ]; then + echo "::error::Expected doxygen tag file not found: $TAG_FILE" + echo "The hdf5.tag file must be generated inside the doxygen html output directory so it is included in the docs-doxygen artifact." + exit 1 + fi + echo "Found doxygen tag file: $TAG_FILE" + # Save doxygen files created by CTest script - name: Save published doxygen (Linux) uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v5 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index a72dd7c0a39..7d664ba0d42 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -128,18 +128,27 @@ jobs: echo "✅ Release files sync completed" - name: Process documentation + env: + FILE_NAME: ${{ inputs.file_name }} run: | set -euo pipefail - DOC_FILE="HDF5/${{ inputs.file_name }}.doxygen.zip" + DOC_FILE="HDF5/${FILE_NAME}.doxygen.zip" if [ -f "$DOC_FILE" ]; then echo "📚 Processing documentation..." unzip -q "$DOC_FILE" - if [ -d "${{ inputs.file_name }}.doxygen" ]; then + if [ -d "${FILE_NAME}.doxygen" ]; then echo "✅ Documentation extracted successfully" else echo "❌ Documentation extraction failed" exit 1 fi + # The doxygen tag file is published alongside the HTML docs + if [ -f "${FILE_NAME}.doxygen/hdf5.tag" ]; then + echo "✅ Found: hdf5.tag" + else + echo "❌ hdf5.tag not found in documentation" + exit 1 + fi else echo "⚠️ Documentation file not found, skipping..." fi diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt index 03e8caca430..e06fac28e07 100644 --- a/docs/doxygen/CMakeLists.txt +++ b/docs/doxygen/CMakeLists.txt @@ -26,7 +26,7 @@ if (DOXYGEN_FOUND) set (DOXYGEN_HTML_FOOTER ${HDF5_DOXYGEN_DIR}/hdf5_footer.html) set (DOXYGEN_HTML_EXTRA_STYLESHEET "${HDF5_DOXYGEN_DIR}/hdf5doxy.css ${HDF5_DOXYGEN_DIR}/doxygen-awesome.css") set (DOXYGEN_HTML_EXTRA_FILES "${HDF5_DOXYGEN_DIR}/hdf5_navtree_hacks.js ${HDF5_DOXYGEN_DIR}/doxygen-awesome-tabs.js") - set (DOXYGEN_TAG_FILE ${HDF5_BINARY_DIR}/hdf5.tag) + set (DOXYGEN_TAG_FILE ${DOXYGEN_OUTPUT_DIRECTORY}/html/hdf5.tag) set (DOXYGEN_SERVER_BASED_SEARCH NO) set (DOXYGEN_EXTERNAL_SEARCH NO) set (DOXYGEN_SEARCHENGINE_URL) @@ -64,15 +64,15 @@ if (DOXYGEN_FOUND) # Replace variables inside @@ with the current values configure_file (${HDF5_DOXYGEN_DIR}/Doxyfile.in ${HDF5_BINARY_DIR}/Doxyfile @ONLY) + # The hdf5.tag file is generated inside hdf5lib_docs/html (see + # DOXYGEN_TAG_FILE above), so this DIRECTORY install also installs it to + # ${HDF5_INSTALL_DOC_DIR}/html/hdf5.tag. Keeping the tag file within the html + # output directory also ensures it is captured by the docs-doxygen CI artifact + # that publishes the documentation (and hdf5.tag) to S3. install ( - DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs/html + DIRECTORY ${DOXYGEN_OUTPUT_DIRECTORY}/html DESTINATION ${HDF5_INSTALL_DOC_DIR} COMPONENT hdfdocuments ) - install ( - FILES ${HDF5_BINARY_DIR}/hdf5.tag - DESTINATION ${HDF5_INSTALL_DOC_DIR}/html - COMPONENT hdfdocuments - ) endif ()