From a5b0a9f11c7f5c16bd9e285648a0662083cb9dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Bori?= Date: Thu, 5 Sep 2024 21:07:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20(doxygen):=20Upload=20Doxygen=20?= =?UTF-8?q?doc=20as=20artifact=20then=20publish=20it=20on=20GitHub=20Pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7a89e9..bb14526 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,3 +12,29 @@ jobs: - uses: cachix/install-nix-action@v27 - run: nix build - run: nix flake check + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: result/share/doc/html/ + + documentation: + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + if: startsWith(github.ref, 'refs/tags/') + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} + needs: build + steps: + - name: Publish Doxygen documentation on GitHub Pages + id: deployment + uses: actions/deploy-pages@v2