From 073280ad32c6a7cbc8a1100f7cb7f19e96bd7e7d Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 21 Feb 2024 19:50:50 +0100 Subject: [PATCH] ci: Require docs job to pass before making a release --- .github/workflows/ci.yaml | 7 +++++++ .github/workflows/docs.yaml | 17 +++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 073e6999e..db6f09122 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,12 @@ concurrency: cancel-in-progress: true jobs: + docs: + name: Docs + if: github.event_name == 'push' + uses: ./.github/workflows/docs.yaml + + Lint-Style: name: Lint & check code style runs-on: ubuntu-latest @@ -353,6 +359,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest needs: + - docs - Lint-Style - Test-Nix - Test-Pg-Nix diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 79c4c50aa..0b3df8c40 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,14 +1,7 @@ name: Docs on: - push: - branches: - - main - - v[0-9]+ - pull_request: - branches: - - main - - v[0-9]+ + workflow_call: concurrency: # Terminate all previous runs of the same workflow for pull requests @@ -17,7 +10,7 @@ concurrency: jobs: build: - name: Build docs + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -29,7 +22,7 @@ jobs: - run: git diff --exit-code HEAD locales || echo "Please commit changes to the locales/ folder after running postgrest-docs-build." spellcheck: - name: Run spellcheck + name: Spellcheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -40,7 +33,7 @@ jobs: - run: postgrest-docs-spellcheck dictcheck: - name: Run dictcheck + name: Dictcheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -51,7 +44,7 @@ jobs: - run: postgrest-docs-dictcheck linkcheck: - name: Run linkcheck + name: Linkcheck if: github.base_ref == 'main' runs-on: ubuntu-latest steps: