docs-check.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: docs-check
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. branches:
  7. - master
  8. - release-*
  9. pull_request:
  10. branches:
  11. - master
  12. - release-*
  13. # cancel the in-progress workflow when PR is refreshed.
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  16. cancel-in-progress: true
  17. permissions:
  18. contents: read
  19. jobs:
  20. docs-check:
  21. name: docs-check
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - uses: actions/checkout@v4
  25. with:
  26. fetch-depth: 0
  27. - uses: actions/setup-go@v4
  28. with:
  29. go-version: "1.21"
  30. - uses: actions/setup-python@v4
  31. with:
  32. python-version: 3.9
  33. - name: Check helm-docs
  34. run: make check-helm-docs
  35. - name: Check docs
  36. run: make check-docs
  37. - name: Install mkdocs and dependencies
  38. run: cd build/release/ && make deps.docs
  39. - name: Check documentation for CRDs
  40. run: |
  41. make generate-docs-crds
  42. DIFF_ON_DOCS=$(git diff --ignore-matching-lines='on git commit')
  43. if [ ! -z "$DIFF_ON_DOCS" ]; then
  44. echo "Please run 'make generate-docs-crds' locally, commit the updated crds docs, and push the change"
  45. fi
  46. git diff --ignore-matching-lines='on git commit' --exit-code
  47. - name: Build documentation using mkdocs
  48. run: make docs-build