docs_release.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. name: Release documentation
  2. on:
  3. push:
  4. branches:
  5. - 'main'
  6. - 'stable-**'
  7. workflow_dispatch:
  8. jobs:
  9. release:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v3
  14. - name: Extract version
  15. shell: bash
  16. run: echo "version=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed -e 's|stable-|v|g' -e 's|-|.|g' >> $GITHUB_OUTPUT
  17. id: extract_version
  18. - name: Release
  19. uses: diplodoc-platform/docs-release-action@v1
  20. with:
  21. revision: "${{ github.sha }}"
  22. version: "${{ steps.extract_version.outputs.version }}"
  23. project-name: ${{ secrets.DOCS_PROJECT_NAME }}
  24. src-root: ${{ vars.SRC_ROOT }}
  25. storage-bucket: ${{ secrets.DOCS_AWS_BUCKET }}
  26. storage-endpoint: ${{ vars.DOCS_AWS_ENDPOINT }}
  27. storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
  28. storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
  29. storage-region: ${{ vars.DOCS_AWS_REGION }}
  30. shared-storage-bucket: true