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

Create a PR comment with docs preview link #1788

Merged
merged 2 commits into from
Nov 26, 2021
Merged

Conversation

logankilpatrick
Copy link
Member

It looks like per @ToucheSir 's comment here: #1784, there is already a documentation preview workflow setup. This simply adds a comment to the PR with a link like we do on the JuliaLang.org website repo.

@github-actions
Copy link
Contributor

Once the build has completed, you can preview any updated documentation at this URL: https://fluxml.ai/Flux.jl/previews/previews/PR1788/ in ~20 minutes

@ToucheSir
Copy link
Member

The problem is, AIUI, that docs previews are only generated for PRs opened by members (with the right set of permissions). So we couldn't tack this onto any old PR.

@logankilpatrick
Copy link
Member Author

Yeah, it would be nice if it let us do that, the current version in this PR only runs when the PR is made from a branch, not from forks. So it will work as is.

runs-on: ubuntu-latest
steps:
- name: Create PR comment
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name # if this is a pull request build AND the pull request is NOT made from a fork
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That's what I get for not scrolling to the end, thanks!

@ToucheSir
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 26, 2021

Build succeeded:

@bors bors bot merged commit bb88c55 into master Nov 26, 2021
@CarloLucibello CarloLucibello deleted the logankilpatrick-patch-8 branch April 7, 2022 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants