docs_preview.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. name: Preview documentation
  2. on:
  3. workflow_run:
  4. workflows:
  5. - Build documentation
  6. types:
  7. - completed
  8. jobs:
  9. post-build:
  10. permissions: write-all
  11. concurrency:
  12. group: preview-documentation-${{ github.ref }}
  13. cancel-in-progress: true
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Upload
  17. uses: diplodoc-platform/docs-upload-action@v1
  18. if: github.event.workflow_run.conclusion == 'success'
  19. with:
  20. github-token: ${{ secrets.GITHUB_TOKEN }}
  21. storage-endpoint: ${{ vars.DOCS_AWS_ENDPOINT }}
  22. storage-region: ${{ vars.DOCS_AWS_REGION }}
  23. storage-bucket: ${{ vars.DIPLODOC_STORAGE_BUCKET }}
  24. storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
  25. storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
  26. - name: Comment message
  27. uses: diplodoc-platform/docs-message-action@v1
  28. with:
  29. github-token: ${{ secrets.GITHUB_TOKEN }}
  30. project-link: ${{ vars.DIPLODOC_PROJECT_LINK }}