From b73e602e6c2bb4ebd86b186699109e8f80c6c81c Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:33:58 +0100 Subject: [PATCH] On PRs (ci.yml): - Tests (Python 3.10-3.13) with lint, format, tests - Docs build check - CI Success gate (requires both to pass) On release (docs.yml): - Builds and deploys docs to GitHub Pages --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/docs.yml | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7df08..e53bdc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,35 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false + + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + + - name: Install dependencies + run: uv sync --extra docs + + - name: Build docs + run: uv run mkdocs build + + ci-success: + name: CI Success + needs: [test, docs] + if: always() + runs-on: ubuntu-latest + steps: + - name: Check all jobs passed + run: | + if [[ "${{ needs.test.result }}" != "success" ]]; then + echo "Test job failed or was cancelled" + exit 1 + fi + if [[ "${{ needs.docs.result }}" != "success" ]]; then + echo "Docs job failed or was cancelled" + exit 1 + fi + echo "All CI checks passed!" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fdb96c9..aa247d5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ name: Docs on: - push: + pull_request: branches: [main] release: types: [published] @@ -26,6 +26,7 @@ jobs: run: uv run mkdocs build - name: Deploy to GitHub Pages + if: github.event_name == 'release' uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }}