diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06da7e7..9e39598 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,9 +82,6 @@ jobs: hatch clean working-directory: ./gitlint-core - - name: Docs build (mkdocs) - run: hatch run docs:build - # Run gitlint. Skip during PR runs, since PR commit messages are transient and usually full of gitlint violations. # PRs get squashed and get a proper commit message during merge. - name: gitlint --debug @@ -100,6 +97,24 @@ jobs: flag-name: gitlint-${{ matrix.os }}-${{ matrix.python-version }} parallel: true + doc_checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.3.0 + with: + ref: ${{ github.event.pull_request.head.sha }} # Checkout pull request HEAD commit instead of merge commit + + - name: Setup python + uses: actions/setup-python@v4.6.0 + with: + python-version: 3.11 + + - name: Install Hatch + run: python -m pip install hatch==1.6.3 + + - name: Docs validation (mkdocs build & linkchecker) + run: hatch run docs:validate + upload_coveralls: needs: checks runs-on: ubuntu-latest @@ -115,8 +130,9 @@ jobs: if: always() # Ref: https://github.com/marketplace/actions/alls-green#why needs: - - upload_coveralls - checks + - doc_checks + - upload_coveralls runs-on: ubuntu-latest @@ -130,6 +146,8 @@ jobs: auto-publish-dev: needs: - check + - doc_checks + if: github.ref == 'refs/heads/main' uses: ./.github/workflows/publish-release.yml secrets: inherit # pass all secrets (required to access secrets in a called workflow) |