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

Preview docs as part of PR #139

Open
stefmolin opened this issue Sep 23, 2023 · 1 comment
Open

Preview docs as part of PR #139

stefmolin opened this issue Sep 23, 2023 · 1 comment
Labels
help wanted Extra attention is needed
Milestone

Comments

@stefmolin
Copy link
Owner

stefmolin commented Sep 23, 2023

As part of the GitHub Actions workflows that run when a PR is opened, I'd like to have something like Matplotlib has that makes it possible to preview the built docs without downloading an artifact or building the docs locally.

Screenshot 2023-09-23 at 7 28 05 PM

Numpydoc also has this:

Screenshot 2024-03-30 at 3 58 22 PM

The details link goes to a preview hosted on CircleCI, but maybe a GitHub-only solution is possible with the latest changes in the artifact action, and using this action to set the details URL?

Read the docs PR previews could also be an option.

@stefmolin stefmolin added the help wanted Extra attention is needed label Sep 23, 2023
@stefmolin stefmolin added this to the 0.3.0 milestone Sep 26, 2023
@stefmolin stefmolin removed this from the 0.3.0 milestone Jun 15, 2024
@stefmolin stefmolin added this to the 0.4.0 milestone Jul 16, 2024
@stefmolin stefmolin pinned this issue Sep 23, 2024
@sesdaile
Copy link

As far as I can tell the only method that will work is Read the docs PR previews as you suggested.

Things tried

  • The upload-artifacts method results in all files being uploaded as a zip and thus can't be viewed via the browser. Not even a proxy such as htmlviewer will be able to work around this.
  • Copying into the repo wiki will only work if using simple interpreted formats such as Markdown, MediaWiki, RDoc, Textile, or reStructuredText. Pushing html files simply does not work.
  • Comments can contain simple html such as detail tags and horizontal rules but divs, spans, and other such things will not work, not to mention the issue with multiple pages.
  • Deploying to a sub-folder of gh-pages the same way versioning works. This would create a security issue permitting anyone to deploy anything they want.

Read the Docs Config

Adding this config does nothing on it's own as the site needs to be configured via the Sign Up page. Instructions can be found here.

# .readthedocs.yaml
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3"

sphinx:
  configuration: docs/conf.py

python:
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants