ci(build): preview PR builds via Read the Docs#210
Merged
ReenigneArcher merged 1 commit intomasterfrom Mar 6, 2025
Merged
Conversation
08212b9 to
53378e5
Compare
53378e5 to
ccca9dd
Compare
There was a problem hiding this comment.
PR Overview
This PR introduces a method to preview PR builds via Read the Docs by adding a Read the Docs configuration file, updating documentation with manual setup instructions, and enhancing the GitHub Actions workflow for Jekyll builds.
- Added a .readthedocs.yaml configuration file to define build settings for Read the Docs.
- Updated the README.md with detailed instructions and configuration examples for PR preview setup.
- Enhanced the extraction commands in the jekyll-build workflow by adding quotes for improved reliability.
Reviewed Changes
| File | Description |
|---|---|
| .readthedocs.yaml | Adds Read the Docs configuration for project builds. |
| README.md | Introduces documentation for PR previews via Read the Docs. |
| .github/workflows/jekyll-build.yml | Improves command quoting for better shell command handling. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Build PRs in Read the Docs as a way to preview builds before merging.
TODO:
Idea for getting GitHub artifacts to readthedocs
Warning
This is probably not a good idea as secrets cannot be protected in rtd for PRs. https://docs.readthedocs.com/platform/stable/guides/environment-variables.html
Suggest to set some environment variables in the readthedocs config for subprojects.
Then get the sha from
https://api.github.com/repos/{org}/{repo}/pulls/{pr number}athead.sha.Then use the sha at
https://api.github.com/repos/{org}/{repo}/commits/{sha}/check-runsand look for the matching workflow name, e.g.call-jekyll-build / Build Jekyll.If the status is already completed move on. If not completed, then use a while loop and keep fetching
https://api.github.com/repos/{org}/{repo}/check-runs/{run-id}until the status is completed or the timeout is reached. We also need to determine other possible statuses to watch for (possibly like cancelled, queued, etc.).https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-workflow-run-artifacts
Must have "actions" scope to download an artifact. 😞
Edit: As a workaround to the requirement to use a github PAT, we can use nightly directly: e.g.
https://nightly.link/LizardByte/Sunshine/actions/runs/13644059809/prep.zip😃Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist