Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate preview links for DOC PRs #89670

Merged
merged 3 commits into from
Aug 26, 2022

Conversation

debadair
Copy link
Contributor

Adds a GitHub Action that will automatically create preview links when a doc pull request is created. Links are added in a comment on the PR.

Borrowed from @richkuz -- Thanks!

@debadair debadair added >docs General docs changes Team:Docs Meta label for docs team labels Aug 26, 2022
@debadair debadair marked this pull request as ready for review August 26, 2022 18:18
@debadair debadair requested a review from richkuz August 26, 2022 18:18
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@bmorelli25
Copy link
Member

bmorelli25 commented Aug 26, 2022

You might consider adding a path filter so that a comment is only added to PRs that change docs.

I haven't done this myself, but it might look something like this:

on:
  pull_request_target:
    types: [opened]
    paths:
      - 'docs/*'
      - 'add_other_doc_dirs_here'

Or even better, target asciidoc files: - '**.asciidoc'.

on:
  pull_request_target:
    types: [opened]
    paths:
      - '**.asciidoc'

I think. Again, I haven't tested this.

@debadair
Copy link
Contributor Author

Ah, yes, good point! Targeting asciidoc files seems like the ticket.

Copy link

@richkuz richkuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @debadair 👍

@debadair debadair requested a review from bmorelli25 August 26, 2022 19:36
Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@bmorelli25
Copy link
Member

Excited to see this in action!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes Team:Docs Meta label for docs team v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants