docs_build.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. name: Build documentation
  2. on:
  3. pull_request_target:
  4. paths:
  5. - 'ydb/docs/**'
  6. jobs:
  7. build-docs:
  8. concurrency:
  9. group: docs-build-${{ github.event.pull_request.number }}
  10. cancel-in-progress: true
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Update integrated status
  14. shell: bash
  15. run: |
  16. curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
  17. https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
  18. -d '{"state":"pending","description":"Waiting for relevant checks to complete","context":"checks_integrated"}'
  19. - name: Checkout
  20. uses: actions/checkout@v3
  21. with:
  22. ref: ${{ github.event.pull_request.head.sha }}
  23. - name: Build
  24. uses: diplodoc-platform/docs-build-action@v3
  25. with:
  26. revision: "pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}"
  27. src-root: "./ydb/docs"
  28. - name: Update integrated status
  29. shell: bash
  30. run: |
  31. curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
  32. https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
  33. -d '{"state":"success","description":"All checks completed","context":"checks_integrated"}'