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

Add Gradle plugin for publishing JavaDoc to GitHub Pages #965

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

ob-stripe
Copy link
Contributor

@ob-stripe ob-stripe commented Feb 11, 2020

r? @brandur-stripe @richardm-stripe
cc @stripe/api-libraries

This PR adds a Gradle plugin (org.ajoberstar.git-publish) that adds support for publishing the JavaDoc HTML output to GitHub pages.

The plugin can be used like this:

$ GRGIT_USER=<GitHub API token> ./gradlew gitPublishPush

This command will build the JavaDoc and push the results to the gh-pages branch. I've configured GitHub pages to use the contents of this branch. Apparently GitHub Pages even knows about the stripe.dev domain, so the results are available at https://stripe.dev/stripe-java.

The intent is that we would run this command automatically in the release pipeline, so the JavaDoc stays up to date. We could then link to it from the README, as requested by a user some time ago (#770).

Copy link
Contributor

@richardm-stripe richardm-stripe left a comment

Choose a reason for hiding this comment

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

lgtm

Although, "github pages knows about stripe.dev" seems backwards to me...
stripe.github.io appears to 301 to stripe.dev, do you happen to know the details of how stripe.dev uses github pages as a backend? Or is it mirrored?

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

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

Niceeee!

The intent is that we would run this command automatically in the release pipeline, so the JavaDoc stays up to date.

Also consider adding it as a GitHub Action — their system for secrets management works pretty well.

We could then link to it from the README, as requested by a user some time ago (#770).

Great idea! I always wished we'd had better docs for the built-in doc system in each given language.

@ob-stripe
Copy link
Contributor Author

Although, "github pages knows about stripe.dev" seems backwards to me...
stripe.github.io appears to 301 to stripe.dev, do you happen to know the details of how stripe.dev uses github pages as a backend? Or is it mirrored?

I'm unsure, but I got the stripe.dev URL directly from GitHub:
image

@ob-stripe
Copy link
Contributor Author

Also consider adding it as a GitHub Action — their system for secrets management works pretty well.

I'm still trying to clarify the status of GitHub Actions on our public repos -- it just got reenabled, but I'd like to make sure it won't be disabled again before we start using it for anything important.

@ob-stripe ob-stripe merged commit 5ad6fda into master Feb 11, 2020
@ob-stripe ob-stripe deleted the ob-gh-pages-publish branch February 11, 2020 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants