diff --git a/.github/workflows/deploy-doc.yml b/.github/workflows/deploy-doc.yml index 1fe2556e388..f45cc7b3f41 100644 --- a/.github/workflows/deploy-doc.yml +++ b/.github/workflows/deploy-doc.yml @@ -8,10 +8,16 @@ on: secrets: REPO_ACCESS_TOKEN: required: true + inputs: + deploy-on-gh-pages: + required: false + type: string + default: "true" jobs: deploy-doc-index: - runs-on: ubuntu-20.04 + if: ${{ inputs.deploy-on-gh-pages == 'true' }} + runs-on: ubuntu-24.02 steps: - name: Checkout remote head uses: actions/checkout@master @@ -22,8 +28,8 @@ jobs: publish_dir: 'doc/index' keep_files: true - deploy-doc: - runs-on: ubuntu-20.04 + build-and-deploy-doc: + runs-on: ubuntu-24.02 steps: - name: Prepare directories run: | @@ -40,7 +46,7 @@ jobs: - name: Install packages run : | sudo apt-get install graphviz plantuml clang-9 libclang-9-dev - - name: Fetch recent doxygen (1.9.8) + - name: Fetch recent doxygen run: | wget https://sourceforge.net/projects/doxygen/files/rel-1.12.0/doxygen-1.12.0.linux.bin.tar.gz -O doxygen.tar.gz tar -zxvf doxygen.tar.gz -C doxygen --wildcards "*/bin" @@ -52,24 +58,35 @@ jobs: GITHUB_REF=${{ github.ref }} echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT id: extract-branch - - name: Configure Doc + - name: Configure and build doc run: | cd build/Radium-Engine + ls -lh ../../doxygen/bin/doxygen + ../../doxygen/bin/doxygen -v cmake ../../src/Radium-Engine/doc -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DDOXYGEN_EXECUTABLE=../../doxygen/bin/doxygen - - name: Build Doc - run: | export GITHUB_REF="${{ steps.extract-branch.outputs.branch }}" cd build/Radium-Engine cmake --build . --target RadiumDoc + # upload doc as artifact if not deployed + - name: Archive doc + if: ${{ inputs.deploy-on-gh-pages == 'false' }} + uses: actions/upload-artifact@v4 + with: + name: doc + path: | + build/Radium-Engine/html/ - name: Fix badges github ref + if: ${{ inputs.deploy-on-gh-pages == 'true' }} run: | export GITHUB_REF="${{ steps.extract-branch.outputs.branch }}" cd build/Radium-Engine sed -i "s/\$(GITHUB_REF)/${GITHUB_REF}/g" html/index.html - name: Git branch name + if: ${{ inputs.deploy-on-gh-pages == 'true' }} id: git-branch-name uses: EthanSK/git-branch-name-action@v1 - name: Deploy Doc + if: ${{ inputs.deploy-on-gh-pages == 'true' }} uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.REPO_ACCESS_TOKEN }} diff --git a/.github/workflows/pull-request-ci.yml b/.github/workflows/pull-request-ci.yml index 76807cdb1a1..5e619e071d0 100644 --- a/.github/workflows/pull-request-ci.yml +++ b/.github/workflows/pull-request-ci.yml @@ -29,3 +29,9 @@ jobs: macos: "false" build-release: "false" coverage: "true" + call-deploy-doc: + uses: ./.github/workflows/deploy-doc.yml + secrets: + REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + with: + deploy-on-gh-pages: "false"