GitHub 页上的自动构建 Sphinx+Doxygen 文档

Autobuild Sphinx+Doxygen documentation on GitHub Pages

我的文档位于 master 分支的 /docs 中。 Sphinx 设置为将构建的文档存储在 /docs/build 文件夹中(源代码在 /docs/source 中)。我如何设置 GitHub 页面以在每次推送时自动构建我的文档?

P.S:将构建的页面存储在 master/docs/buildgh-pages/ 中都可以。

有 4 个 GitHub 操作帮助了我。

  1. Doxygen Action 提取 doxygen 文档
  2. Sphinx Action 构建 sphinx 文档(它甚至理解 pythons' requirements.txt
  3. Upload Artifact 存储构建的文档
  4. GitHub Push 将更改推送到 gh-pages

实际上,我发现使用 GitHub Actions 非常方便。有很多预制工具,很好用,也很容易理解。

P.S:可以找到我的工作流代码here。放心使用吧。