Skip to content

.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

Merged
merged 1 commit into from
May 5, 2025

Conversation

AnnsAnns
Copy link
Contributor

@AnnsAnns AnnsAnns commented Apr 30, 2025

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 or doc/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

@github-actions github-actions bot added Area: doc Area: Documentation Area: CI Area: Continuous Integration of RIOT components and removed Area: doc Area: Documentation labels Apr 30, 2025
@mguetschow
Copy link
Contributor

Great, thanks! How hard would it be to deploy the documentation somewhere as a preview for the PR?

@AnnsAnns
Copy link
Contributor Author

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.

@mguetschow
Copy link
Contributor

if we vendor lock ourselves and use something like vercel previews, pages.dev etc it's legitimately a single command at the end

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.

@Teufelchen1
Copy link
Contributor

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 make doc-starlight and see for yourself. I believe it is not worth our time and the added complexity to build a preview deployment for guides.
After all, it is not doxygen that breaks violently when one misses a bracket or something.

@mguetschow
Copy link
Contributor

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.

@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented May 2, 2025

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.

@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented May 2, 2025

It works*
(*on my blog there are a lot of permalinks which don't properly adjust to the baseUrl, this shouldn't be the case for the guide. It also required some minor adjustments to dynamically set the baseUrl).

AnnsAnns/Bort#17
https://annsann.eu/pr-preview/pr-17/ramblings/

@github-actions github-actions bot added the Area: doc Area: Documentation label May 2, 2025
@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented May 2, 2025

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.

@github-actions github-actions bot removed the Area: doc Area: Documentation label May 2, 2025
Teufelchen1
Teufelchen1 previously approved these changes May 5, 2025
@Teufelchen1 Teufelchen1 dismissed their stale review May 5, 2025 08:17

Needs squashing

@Teufelchen1
Copy link
Contributor

Please squash!

@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented May 5, 2025

squashed

@Teufelchen1 Teufelchen1 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 5, 2025
@Teufelchen1 Teufelchen1 enabled auto-merge May 5, 2025 10:51
@riot-ci
Copy link

riot-ci commented May 5, 2025

Murdock results

✔️ PASSED

67f88e5 .github/workflows: Guide Site Build Test

Success Failures Total Runtime
1 0 1 01m:23s

Artifacts

@Teufelchen1 Teufelchen1 added this pull request to the merge queue May 5, 2025
Merged via the queue into RIOT-OS:master with commit 36ca9b3 May 5, 2025
27 checks passed
@Teufelchen1 Teufelchen1 added this to the Release 2025.07 milestone Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: Continuous Integration of RIOT components CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants