Skip to content

Commit

Permalink
[DOCS] Add buildkite links to doc preview comments (elastic#175463)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored and CoenWarmer committed Feb 15, 2024
1 parent 88ab30f commit 8915533
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/docs-preview-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ on:
paths:
- '**.asciidoc'

permissions:
pull-requests: write
jobs:
doc-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
name: Add doc preview links
- uses: elastic/docs/.github/actions/docs-preview@current
with:
script: |
const pr = context.payload.pull_request;
const comment = `Documentation preview:
- ✨ [Changed pages](https://${context.repo.repo}_${pr.number}.docs-preview.app.elstc.co/diff)`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment,
});
github-token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.event.repository.name }}
preview-path: 'guide/en/observability/master/index.html'
pr: ${{ github.event.pull_request.number }}

0 comments on commit 8915533

Please sign in to comment.