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

docs: preview in PRs #96

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexanderLanin
Copy link

Current State

Documentation is built during PRs, and currently, an artifact is uploaded, with a link to the artifact added to the PR. However, this generates numerous links (e.g., see #94), and to view the documentation, users must download and extract the artifact manually.

Desired State

Provide a direct link to the documentation preview in PRs. This link should allow users to preview the documentation directly, without extra steps, and remain stable throughout the PR's lifetime, unaffected by new commits.

Solution

Since GitHub Pages supports only a single folder or artifact per repository, and rebuilding all versions of documentation for every PR is inefficient, a new approach is needed. The gh-pages branch will act as persistent storage for documentation artifacts. Each PR will store its specific documentation in a dedicated subfolder within this branch.

When a PR is updated, the workflow will add or update the corresponding documentation in its designated subfolder. Once the PR is closed or merged, its documentation subfolder will be removed to keep the branch manageable. This approach ensures stable links, efficient builds, and clear documentation previews.

This probably belongs to #78. And it closes #94.

@ltekieli
Copy link
Member

gh pages generation is set to workflow currently:

FScholPer
FScholPer previously approved these changes Dec 17, 2024
Copy link

@FScholPer FScholPer left a comment

Choose a reason for hiding this comment

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

Thank you for the fast fix. Really good job done :)

@AlexanderLanin
Copy link
Author

AlexanderLanin commented Dec 17, 2024

gh pages generation is set to workflow currently:

I guess I'll change this PR to try uploading both ways.
Then we can change the other repository.
Then we undo those temporary changes.

@AlexanderLanin
Copy link
Author

This is quite ugly, I will split cleanup into a separate workflow, so it doesn't show up here.
image

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.

Remove comment artifact url in every commit
3 participants