docs_release.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Release documentation
  2. on:
  3. push:
  4. branches:
  5. - 'main'
  6. - 'stable-**'
  7. paths:
  8. - 'ydb/docs/**'
  9. workflow_dispatch:
  10. jobs:
  11. build:
  12. runs-on: ubuntu-latest
  13. concurrency:
  14. group: release-documentation-${{ github.ref }}
  15. cancel-in-progress: true
  16. permissions: write-all
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v4
  20. - name: Build
  21. uses: diplodoc-platform/docs-build-action@v3
  22. with:
  23. revision: "${{ github.sha }}"
  24. src-root: ${{ vars.SRC_ROOT }}
  25. upload:
  26. needs: build
  27. runs-on: ubuntu-latest
  28. concurrency:
  29. group: release-documentation-${{ github.ref }}
  30. cancel-in-progress: true
  31. permissions: write-all
  32. steps:
  33. - name: Upload
  34. uses: diplodoc-platform/docs-upload-action@v1
  35. with:
  36. github-token: ${{ secrets.GITHUB_TOKEN }}
  37. storage-bucket: ${{ secrets.DOCS_AWS_BUCKET }}
  38. storage-endpoint: ${{ vars.DOCS_AWS_ENDPOINT }}
  39. storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
  40. storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
  41. storage-region: ${{ vars.DOCS_AWS_REGION }}
  42. release:
  43. needs: upload
  44. runs-on: ubuntu-latest
  45. concurrency:
  46. group: release-documentation-${{ github.ref }}
  47. cancel-in-progress: true
  48. steps:
  49. - name: Extract version
  50. shell: bash
  51. run: echo "version=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed -e 's|stable-|v|g' -e 's|-|.|g' >> $GITHUB_OUTPUT
  52. id: extract_version
  53. - name: Release
  54. uses: diplodoc-platform/docs-release-action@v2
  55. with:
  56. revision: "${{ github.sha }}"
  57. version: "${{ steps.extract_version.outputs.version }}"
  58. storage-bucket: ${{ secrets.DOCS_AWS_BUCKET }}
  59. storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
  60. storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}