stream: docs and tutorial for xata clone stream #146
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs Preview | |
| on: | |
| pull_request_target: # Like pull_request but runs the 'base' workflow, safer and works with forks. | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| docs-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate preview URL | |
| id: generate_url | |
| run: | | |
| PR_OWNER=${{ github.event.pull_request.head.repo.owner.login }} | |
| BRANCH=${{ github.event.pull_request.head.ref }} | |
| PREVIEW_URL="https://xata.io/next/preview-path?path=/docs-preview/${PR_OWNER}:${BRANCH}/" | |
| echo "preview_url=${PREVIEW_URL}" >> $GITHUB_OUTPUT | |
| - name: Create or update docs preview comment | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| 📖 **Docs Preview** | |
| Preview URL: ${{ steps.generate_url.outputs.preview_url }} | |