From 3ede23f82612e1e0dc863c3c4843d5c392d6a99d Mon Sep 17 00:00:00 2001 From: imdeaddev Date: Tue, 9 Dec 2025 21:21:39 +0300 Subject: [PATCH] Separated docs generation from testing --- .github/workflows/ctest.yml | 28 ---------------------- .github/workflows/pages.yml | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/ctest.yml b/.github/workflows/ctest.yml index 336ef59..91e745b 100644 --- a/.github/workflows/ctest.yml +++ b/.github/workflows/ctest.yml @@ -65,31 +65,3 @@ jobs: working-directory: ${{ steps.strings.outputs.build-output-dir }} run: ctest --build-config ${{ matrix.build_type }} - generate-docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set reusable strings - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - - name: Configure CMake - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DDEADDEV_BITMASK_GENERATE_DOCS=ON - -DDEADDEV_BITMASK_BUILD_EXAMPLES=OFF - -DDEADDEV_BITMASK_BUILD_TESTS=OFF - -S ${{ github.workspace }} - - - name: Doxygenize - uses: langroodi/doxygenize@v1.7.1 - with: - doxygenconf: ./build/Doxyfile - htmloutput: ./docs - ghpagesbranch: gh-pages - ghpagesdir: ./ - diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..bb53651 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,47 @@ +name: Deploy static content to Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + - name: Configure CMake + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DDEADDEV_BITMASK_GENERATE_DOCS=ON + -DDEADDEV_BITMASK_BUILD_EXAMPLES=OFF + -DDEADDEV_BITMASK_BUILD_TESTS=OFF + -S ${{ github.workspace }} + - name: Build + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target deaddev_doc_doxygen + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ${{ github.workspace }}/docs/html + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4