name: docs-check on: push: tags: - v* branches: - master - release-* pull_request: branches: - master - release-* # cancel the in-progress workflow when PR is refreshed. concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true permissions: contents: read jobs: docs-check: name: docs-check runs-on: ubuntu-22.04 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: "1.23" - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: 3.9 - uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # v19.1.0 with: globs: | Documentation/**/*.md !Documentation/Helm-Charts - name: Check docs run: | make gen.docs tests/scripts/validate_modified_files.sh docs - name: Install mkdocs and dependencies run: cd build/release/ && make deps.docs - name: Check documentation for CRDs run: | make generate-docs-crds DIFF_ON_DOCS=$(git diff --ignore-matching-lines='on git commit') if [ ! -z "$DIFF_ON_DOCS" ]; then echo "Please run 'make generate-docs-crds' locally, commit the updated crds docs, and push the change" fi git diff --ignore-matching-lines='on git commit' --exit-code - name: Build documentation using mkdocs run: make docs-build