-
Notifications
You must be signed in to change notification settings - Fork 2.1k
.github/workflows: Guide Site Build Test #21458
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
Conversation
Great, thanks! How hard would it be to deploy the documentation somewhere as a preview for the PR? |
Depends on how and where, if we vendor lock ourselves and use something like vercel previews, pages.dev etc it's legitimately a single command at the end, if we want to adjust murdocks I don't fully know what to change and it might be more complicated. This is the one shortfall of github pages compared to nearly all other static site hosts nowadays. Generally I'd also really like a preview being deployed but the combination of this ci test with the markdown that's mostly github compatible might be the easier choice for now. You shouldn't be missing out too much unless a PR adds crazy MDX content which github cant render. |
Is it really a vendor lock-in though if we can simply switch / disable the preview at any time if needed? I think it's still valuable to see the whole guide site deployed, and not just the single markdown files on Github. |
I would not block a preview feature but I do think: we do not need that extra complexity. Once the "functional" PRs for the guides are in, we will only/mostly see content PRs. Content PRs are reviewable by code and the markdown rendering of GitHub. Yes it is not perfect but if one has doubts that the PR author did not test if it would render correctly via starlight, you can still checkout the changes locally and quickly run |
I tend to agree if it really is complex to be added, but @AnnsAnns made it sound above like it would be very easy to add, and in that case I'd say the benefits outweigh the costs. |
The complexity would probably come from the fact that it would require RIOT to have some kind of official account at one of the web providers and we would have to deal with secrets etc. which means a bit of coordination would be required. After further investigation I found this action that deploys to gh pages. This might work without those issues but I haven't tested it yet. I'll try to test it on something like my blog which has a similar tech stack and report back whether adding this would be complex or not. If it's not too complex and works well we could add this, if it is complex or has some downsides I'd probably just ignore this for now. |
It works* AnnsAnns/Bort#17 |
Nevermind, I just realized a critical flaw in this. RIOT PRs don't come from different branches, they come from different forks. This solution does not account for that (given that this would allow any person to "commit" stuff into the RIOT gh-pages branch). I will revert my commit. The only way this would work would be for forks to enable github pages which isn't an automatic process and would result in CI errors if not enabled. |
Please squash! |
squashed |
Contribution description
With the #21404 we included a CI build and deploy script, however, something that wasn't in the scope of that PR but should greatly enhance the CI is a simple build test.
The new workflow will be executed whenever changes are made to
doc/guides
ordoc/starlight
to catch any mistakes ahead of time.Testing procedure
I have included a negative and positive example commit within the PR to see this in action.
Since Github will not execute workflows added in PRs (for good reason). These are only viewable through my fork:
Issues/PRs references
Follow-up on #21404