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

website: Add Sphinx documentation to website using GitHub Actions #159

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from

Conversation

erin-le
Copy link
Contributor

@erin-le erin-le commented Nov 26, 2024

This PR adds a workflow file that builds the Sphinx documentation and pushes it to the gem5 website. Currently, it is set to run once a week and build documentation for the stable version of gem5. This PR also includes a Python script that adds frontmatter and makes other alterations to the HTML files generated by Sphinx so they are compatible with the gem5 website.

This was tested using my own forks of the gem5 website and the gem5 repo, so some issues may come up when this workflow is run with the gem5/website repo.

The workflow file also won't work right now, as the current stable version of gem5 doesn't have the docs folder needed to build Sphinx. This won't be a problem once v 24.1 comes out, however.

@powerjg powerjg requested a review from Copilot November 26, 2024 20:45

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

add-sphinx-docs.py:7

  • [nitpick] The variable name 'search_flag' is ambiguous. It should be renamed to something more descriptive like 'is_searchbox_visible'.
search_flag = False
@powerjg
Copy link
Contributor

powerjg commented Nov 26, 2024

This is great! I'm testing to see how well copilot works here :)

Copy link
Contributor

@powerjg powerjg left a comment

Choose a reason for hiding this comment

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

A couple of small things, but I really like this solution!

.github/workflows/sphinx-to-website.yaml Outdated Show resolved Hide resolved
add-sphinx-docs.py Outdated Show resolved Hide resolved
This commit makes the requested changes to use a dedicated GitHub
action to commit and push, and to use a different permalink.
This commit also adds in the link to the index page to
documentation.yml, which was previously missed and is necessary
to have the index page be linked to by the website's sidebar.
@erin-le erin-le requested a review from powerjg November 28, 2024 01:00
Copy link
Contributor

@powerjg powerjg left a comment

Choose a reason for hiding this comment

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

A couple more small things.

.github/workflows/sphinx-to-website.yaml Outdated Show resolved Hide resolved
.github/workflows/sphinx-to-website.yaml Outdated Show resolved Hide resolved
add-sphinx-docs.py Show resolved Hide resolved
add-sphinx-docs.py Outdated Show resolved Hide resolved
This commit changes the path to files to be committed and removes
the caching step from sphinx-to-website.yaml. It also makes
formatting changes to add-sphinx-docs.py and adds a copyright
header.
@erin-le erin-le requested a review from powerjg December 11, 2024 05:38
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