diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml new file mode 100644 index 00000000..1512b0b4 --- /dev/null +++ b/.github/workflows/build-documentation.yml @@ -0,0 +1,65 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: publish docs + +on: + push: + branches: [ "trunk" ] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Install dependencies Ubuntu + run: sudo apt-get update && sudo apt-get install cmake doxygen + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + cache: 'pip' # caching pip dependencies + - run: pip install -r docs/requirements.txt + + - name: Configure CMake + run: > + cmake -S . -B build + -DZEEP_BUILD_DOCUMENTATION=ON + -DZEEP_BUILD_LIBRARY=OFF + -DBUILD_TESTING=OFF + + - name: Run Sphinx + run: cmake --build build --target Sphinx-libzeep + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ${{ steps.strings.outputs.build-output-dir }}/docs/sphinx + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + needs: docs + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ab99bc89..f6d3f16c 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -4,7 +4,7 @@ name: multi platform test on: push: - branches: [ "trunk" ] + branches: [ "trunk", "develop" ] pull_request: branches: [ "trunk" ] @@ -82,11 +82,8 @@ jobs: -S ${{ github.workspace }} - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest --build-config ${{ matrix.build_type }} diff --git a/README.md b/README.md index b908aebc..195340a4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![DOI](https://zenodo.org/badge/44161414.svg)](https://zenodo.org/badge/latestdoi/44161414) -[![Documentation Status](https://readthedocs.org/projects/libzeep/badge/?version=latest)](https://libzeep.readthedocs.io/en/latest/?badge=latest) [![github CI](https://github.com/mhekkel/libzeep/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/mhekkel/libzeep/actions) +[![github CI](https://github.com/mhekkel/libzeep/actions/workflows/build-documentation.yml/badge.svg)](https://github.com/mhekkel/libzeep/actions) libzeep ======= diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index a45abd68..a6b557bd 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -26,14 +26,14 @@ add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE} MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN} COMMENT "Generating docs") -add_custom_target("Doxygen-${PROJECT_NAME}" ALL DEPENDS ${DOXYGEN_INDEX_FILE}) +add_custom_target("Doxygen-libzeep" ALL DEPENDS ${DOXYGEN_INDEX_FILE}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${CMAKE_CURRENT_SOURCE_DIR}/conf.py @ONLY) set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}) set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/sphinx) -add_custom_target("Sphinx-${PROJECT_NAME}" ALL +add_custom_target("Sphinx-libzeep" ALL COMMAND ${SPHINX_EXECUTABLE} -b html -Dbreathe_projects.libzeep=${DOXYGEN_OUTPUT_DIR} ${SPHINX_SOURCE} ${SPHINX_BUILD} diff --git a/docs/lib-http.rst b/docs/lib-http.rst index 13f2abf2..c3a39cd0 100644 --- a/docs/lib-http.rst +++ b/docs/lib-http.rst @@ -339,6 +339,7 @@ a way to add your own processing tags using an `add_processor` method but that h +------------------+-----------------------------------------------------------------------------------------------+ | tag name | Description and Examples | +| | | | (without prefix) | | +==================+===============================================================================================+ | include | Takes one parameter named `file` and replaces the tag with the processed content of this file |