File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 1
- name : Docs Preview Links
1
+ name : docs-preview
2
2
3
3
on :
4
4
pull_request_target :
5
5
types : [opened]
6
6
paths :
7
7
- ' **.asciidoc'
8
+ permissions :
9
+ pull-requests : write
8
10
9
11
jobs :
10
- doc-preview :
12
+ doc-preview-pr :
11
13
runs-on : ubuntu-latest
12
14
steps :
13
- - uses : actions/github-script@v6
14
- name : Add doc preview links
15
+ - uses : elastic/docs/.github/actions/docs-preview@master
15
16
with :
16
- script : |
17
- const pr = context.payload.pull_request;
18
- const comment = `Documentation preview:
19
- - ✨ [Changed pages](https://${context.repo.repo}_${pr.number}.docs-preview.app.elstc.co/diff)`;
20
-
21
- github.rest.issues.createComment({
22
- issue_number: context.issue.number,
23
- owner: context.repo.owner,
24
- repo: context.repo.repo,
25
- body: comment,
26
- });
17
+ github-token : ${{ secrets.GITHUB_TOKEN }}
18
+ repo : ${{ github.event.repository.name }}
19
+ preview-path : ' guide/index.html'
20
+ pr : ${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments