1
0

update-ops-docs.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Update Operations Documentation
  2. on:
  3. push:
  4. paths:
  5. - 'docs/ops/**'
  6. - 'scripts/create_ops_docs.py'
  7. pull_request:
  8. paths:
  9. - 'docs/ops/**'
  10. - 'scripts/create_ops_docs.py'
  11. jobs:
  12. update-ops-docs:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout repository
  16. uses: actions/checkout@v4
  17. - name: Set up Python
  18. uses: actions/setup-python@v5
  19. with:
  20. python-version: '3.x'
  21. - name: Generate operations documentation to temporary file
  22. run: |
  23. mkdir -p /tmp/ops_check
  24. ./scripts/create_ops_docs.py /tmp/ops_check/ops.md
  25. - name: Check if docs/ops.md matches generated version
  26. run: |
  27. if ! diff -q docs/ops.md /tmp/ops_check/ops.md; then
  28. echo "Operations documentation (docs/ops.md) is not up to date with the backend CSV files."
  29. echo "To fix: run ./scripts/create_ops_docs.py and commit the updated docs/ops.md along with your changes"
  30. echo "Differences found:"
  31. diff docs/ops.md /tmp/ops_check/ops.md || true
  32. exit 1
  33. fi
  34. echo "Operations documentation is up to date."