diff --git a/.github/scripts/build-gh-pages.sh b/.github/scripts/build-gh-pages.sh index 894d71d..9143021 100644 --- a/.github/scripts/build-gh-pages.sh +++ b/.github/scripts/build-gh-pages.sh @@ -3,18 +3,24 @@ set -e +#Run with sudo if not root user +SUDO="" +if [ $(id -u) -ne 0 ]; then + SUDO="sudo" +fi + echo "Installing apt packages" -sudo apt-get update >/dev/null -sudo apt-get install -y wget git cmake graphviz >/dev/null +$SUDO apt-get update >/dev/null +$SUDO apt-get install -y wget git cmake graphviz >/dev/null echo "Installing Doxygen" -wget https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz >/dev/null +wget -q https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz tar -xzf doxygen-1.12.0.linux.bin.tar.gz >/dev/null export PATH="$PWD/doxygen-1.12.0/bin:$PATH" #List of branches to build docs for #TODO: Remove doxygen branch once tested -BRANCHES="doxygen master develop" +BRANCHES="master develop" build-docs() ( git checkout $1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f6609f..4a3acba 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,7 +5,6 @@ on: branches: - master - develop - - doxygen # TODO: Remove after testing #Only one of this workflow runs at a time concurrency: diff --git a/doc/html/CMakeLists.txt b/doc/html/CMakeLists.txt index 70677f8..62a82ab 100644 --- a/doc/html/CMakeLists.txt +++ b/doc/html/CMakeLists.txt @@ -26,8 +26,6 @@ if("html" IN_LIST DOC_VERSIONS) list(REMOVE_ITEM DOC_VERSIONS "html") endif() -message(STATUS "Existing documentation versions: ${FENIX_DOC_VERSIONS}") - list(APPEND DOC_VERSIONS ${DOXYGEN_HTML_OUTPUT}) list(REMOVE_DUPLICATES DOC_VERSIONS) list(SORT DOC_VERSIONS) @@ -36,6 +34,8 @@ if("main" IN_LIST DOC_VERSIONS) list(PREPEND DOC_VERSIONS "main") endif() +message(STATUS "Documentation versions: ${DOC_VERSIONS}") + set(DOC_DEFAULT_VERSION "develop") if(NOT DOC_DEFAULT_VERSION IN_LIST DOC_VERSIONS) set(DOC_DEFAULT_VERSION ${FENIX_BRANCH})