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

Build and deploy every PR to some other web endpoint to preview Material for Mkdocs rendering of changes #588

Open
felker opened this issue Dec 19, 2024 · 0 comments

Comments

@felker
Copy link
Member

felker commented Dec 19, 2024

Although we have the instructions in the README.md for everyone to pretty easily Preview the docs locally and test for errors, anecdotally I know not many contributors to the docs source regularly perform this check when they are making changes in a branch on this repository or on their fork in order to open a pull request.

This is becoming a more important step in proofreading and testing any changes beyond the most trivial, since we keep adding custom CSS, Mkdocs extensions and plugins, which means that the GitHub Flavored Markdown (GFM) rendering that you can see in the GitHub UI previews might not be a good representation of what is deployed. The divergence of the two is becoming greater.

It is trivial to extend the existing GitHub Actions workflow that runs the build step on the source branch and checks for errors to also deploy and render the changes like in
https://github.com/argonne-lcf/user-guides/blob/73405b588510ed7a132ffc4187c166f2e31dcd09/.github/workflows/update-livesite.yml
to another URL destination specified via
https://www.mkdocs.org/user-guide/deploying-your-docs/
or by changing the following lines

user-guides/mkdocs.yml

Lines 356 to 358 in 73405b5

repo_name: 'argonne-lcf/user-guides'
repo_url: 'https://github.com/argonne-lcf/user-guides'
site_url: 'https://docs.alcf.anl.gov/'

Ideally, a bot would then post a comment in the PR with the URL containing the build, so that the author and any reviewers can conveniently double check the rendering of the changes contained in the pull request (without having to build it locally).

The only big question would be where to host these "temporary" docs. The most convenient would be a public URL such as
https://docs.alcf.anl.gov/reponame/branchname
https://docs.alcf.anl.gov/pull/ID/head
It would need to be excluded from Google Searches.

Nothing contained in this public repo is private, but if we wanted to host them on some URL behind an ANL/ALCF login, that would still be convenient and promote better code reviews versus the status quo.

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

No branches or pull requests

1 participant