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

[Merged by Bors] - Add automatic docs deployment to GitHub Pages #3535

Closed
wants to merge 6 commits into from

Conversation

james7132
Copy link
Member

@james7132 james7132 commented Jan 3, 2022

Objective

Partially address #407 by setting up automated deployments of bevy's API reference to GitHub Pages.

Solution

Set up a GitHub Actions workflow that builds the docs on every push to main and pushes a new commit to a gh-pages (or docs branch).

A few smaller additions to better address #407:

  • A top level redirect was added to take "docs.bevyengine.org" directly to the bevy crate docs.
  • A GitHub Pages CNAME file for supporting a publicly viewable domain instead of github.io
  • A robots.txt file is added to disable all search engine crawlers that respect it from crawling it (avoid having conflicting Google search results)
  • A .nojekyl file to speed up deployments since there is no Jekyll templating in the output.

This may require configuration of the GITHUB_TOKEN of the CI to successfully run this.

Followup

For this to completely resolve #407, a subdomain of https://bevyengine.org/ needs to be set up to point to the CNAME location. This is initially set to "dev-docs.bevyengine.org".

@alice-i-cecile alice-i-cecile added A-Meta About the project itself C-Docs An addition or correction to our documentation labels Jan 3, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

This will be very useful. The workflow looks reasonable to me, and it's very clear.

@Nilirad
Copy link
Contributor

Nilirad commented Jan 3, 2022

Great! This will close bevyengine/bevy-website#181.

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

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

I think it needs to be made very clear in the docs deployed that this would be the doc for Bevy main and not the released version.
Maybe a custom logo with "main" added? Or a sticky header bar that would say "Bevy main - version under development"?

@Nilirad
Copy link
Contributor

Nilirad commented Jan 3, 2022

A message on top could say "Development build docs. Click for the latest release docs", or something like that.

Alternatively, we can have a dropdown menu like docs.rs to choose between development and release docs.

@james7132
Copy link
Member Author

Added a sed command that changes the icon out for something more noticeable., and added a header.html shim to force Google not to index, even when linked from other sites. Other search engines should basically stop at the robots.txt.

@NiklasEi
Copy link
Member

NiklasEi commented Jan 3, 2022

Before more people go looking: the new icon is coming in bevyengine/bevy-website#234

bors bot pushed a commit to bevyengine/bevy-website that referenced this pull request Mar 15, 2022
This adds a PNG icon for denoting the development docs made from bevy's `main` branch. Added as suggested in bevyengine/bevy#3535.

If it doesn't show up in the diff, this is how it looks right now:

![image](https://user-images.githubusercontent.com/3137680/147969010-2092c921-fb53-4549-981b-8a7467cf3de0.png)

Co-authored-by: Aevyrie Roessler <aevyrie@gmail.com>
@james7132
Copy link
Member Author

With bevyengine/bevy-website#234 merged, @mockersf, any other thing that's needed? It's a little hard to notice right now, but it should be enough to distinguish between it and docs.rs. I could add a sticky banner as suggested earlier, but --html-before-content seems to shove it in a row-oriented flexbox due to the navbar. Not familiar enough with HTML/CSS to make it actually stick above everything.

@mockersf
Copy link
Member

mockersf commented Mar 15, 2022

This should be good to go now.

The target domain/url is something that is up to Cart. Maybe it should not live on the website / under a bevyengine.org url as we try to keep the website only for the released version? Maybe a subdomain would be enough to differentiate?

I think the url where it would be deployed without custom domain would be https://bevyengine.github.io/bevy, that could help with having website for release, GitHub for in development?

Co-authored-by: François <mockersf@gmail.com>
@cart
Copy link
Member

cart commented Mar 15, 2022

Yeah I'm ready to move forward on this. I do think that docs.bevyengine.org is the wrong name for "in development / unstable" docs. I do think a github url is a reasonable way to correlate the context to "in development", but its worth calling out that github also hosts our "stable releases and branches". We might be able to make it even more clear with a custom url. unstable-docs.bevyengine.org, dev-docs.bevyengine.org, dev-api.bevyengine.org etc.

I think I like the dev-docs prefix, for symmetry with docs.rs. I am interested to hear what everyone else thinks.

@james7132
Copy link
Member Author

I agree with the dev-docs subdomain. It seems recognizable at first glance, shorter than unstable-docs, and doesn't look like a REST API subdomain, unlike dev-api.

@cart
Copy link
Member

cart commented Mar 15, 2022

Cool lets roll with that. I'll get the domain set up.

@cart
Copy link
Member

cart commented Mar 15, 2022

We might actually need to merge this pr first. Can you update the domain?

@cart
Copy link
Member

cart commented Mar 15, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 15, 2022
# Objective

Partially address #407 by setting up automated deployments of `bevy`'s API reference to GitHub Pages.

## Solution

Set up a GitHub Actions workflow that builds the docs on every push to `main` and pushes a new commit to a `gh-pages` (or `docs` branch).

A few smaller additions to better address #407:

 - A top level redirect was added to take "docs.bevyengine.org" directly to the `bevy` crate docs.
 - A GitHub Pages CNAME file for supporting a publicly viewable domain instead of `github.io`
 - A robots.txt file is added to disable all search engine crawlers that respect it from crawling it (avoid having conflicting Google search results)
 - A .nojekyl file to speed up deployments since there is no Jekyll templating in the output.

This may require configuration of the  `GITHUB_TOKEN` of the CI to successfully run this.

## Followup

For this to completely resolve #407, a subdomain of https://bevyengine.org/ needs to be set up to point to the CNAME location. This is initially set to "dev-docs.bevyengine.org".

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
@bors bors bot changed the title Add automatic docs deployment to GitHub Pages [Merged by Bors] - Add automatic docs deployment to GitHub Pages Mar 15, 2022
@bors bors bot closed this Mar 15, 2022
bors bot pushed a commit that referenced this pull request Mar 15, 2022
# Objective

- #3535 introduced deploying docs with an error in sed command

## Solution

- fix sed command
- make the command cross platform
@james7132 james7132 mentioned this pull request Mar 21, 2022
@james7132 james7132 deleted the docs-deploy-ci branch March 21, 2022 01:37
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

Partially address bevyengine#407 by setting up automated deployments of `bevy`'s API reference to GitHub Pages.

## Solution

Set up a GitHub Actions workflow that builds the docs on every push to `main` and pushes a new commit to a `gh-pages` (or `docs` branch).

A few smaller additions to better address bevyengine#407:

 - A top level redirect was added to take "docs.bevyengine.org" directly to the `bevy` crate docs.
 - A GitHub Pages CNAME file for supporting a publicly viewable domain instead of `github.io`
 - A robots.txt file is added to disable all search engine crawlers that respect it from crawling it (avoid having conflicting Google search results)
 - A .nojekyl file to speed up deployments since there is no Jekyll templating in the output.

This may require configuration of the  `GITHUB_TOKEN` of the CI to successfully run this.

## Followup

For this to completely resolve bevyengine#407, a subdomain of https://bevyengine.org/ needs to be set up to point to the CNAME location. This is initially set to "dev-docs.bevyengine.org".

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

- bevyengine#3535 introduced deploying docs with an error in sed command

## Solution

- fix sed command
- make the command cross platform
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Partially address bevyengine#407 by setting up automated deployments of `bevy`'s API reference to GitHub Pages.

## Solution

Set up a GitHub Actions workflow that builds the docs on every push to `main` and pushes a new commit to a `gh-pages` (or `docs` branch).

A few smaller additions to better address bevyengine#407:

 - A top level redirect was added to take "docs.bevyengine.org" directly to the `bevy` crate docs.
 - A GitHub Pages CNAME file for supporting a publicly viewable domain instead of `github.io`
 - A robots.txt file is added to disable all search engine crawlers that respect it from crawling it (avoid having conflicting Google search results)
 - A .nojekyl file to speed up deployments since there is no Jekyll templating in the output.

This may require configuration of the  `GITHUB_TOKEN` of the CI to successfully run this.

## Followup

For this to completely resolve bevyengine#407, a subdomain of https://bevyengine.org/ needs to be set up to point to the CNAME location. This is initially set to "dev-docs.bevyengine.org".

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- bevyengine#3535 introduced deploying docs with an error in sed command

## Solution

- fix sed command
- make the command cross platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Meta About the project itself C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish API Documentation for Master Branch
6 participants