I made a Github action to make all my docs building be done in CI and thought I'd share it in case anyone is interested
https://github.com/ire4ever1190/nim-docs-action
Can be added to an existing workflow by adding this step (Full working example is in the repo's readme)
- name: "Build documentation"
uses: "ire4ever1190/nim-docs-action@v1"
with:
main-file: src/foo.nim # Replace with your main file
# deploy: pages # If you want to auto-deploy to Github pages also
One difference compared to other solutions I've seen is that this builds documentation for the latest tag, that way the documentation lines up with what someone would usually install (Working on building both stable/devel docs).
Feedback/criticism is welcome!
Sweet! I documented workflow files in my "NimSetup" repository (just my obsidian md files regarding various boring technical stuff such as setting up workflows).
Generally in terms of feature feedback I'd have the following desires:
I'd need to look into it more, cause a full docs rebuild might not be too slow
The action doesn't configure Nim, you need to do it yourself (Which means you can choose any Nim version). I did this so people aren't restricted to how I'd configure Nim.
Definitely want to do that, also aim to emit .idx files for it so it shows up in the index (Like with the Nim documents)
Would certainly be possible, though the main configuration would be making the matrix which you'd need to do even if there was an action for it so it wouldn't save much configuration