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

Automate releasing documentation #12

Open
mniewrzal opened this issue Feb 14, 2022 · 8 comments
Open

Automate releasing documentation #12

mniewrzal opened this issue Feb 14, 2022 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@mniewrzal
Copy link
Contributor

Would be nice to automatically generate/deploy a new version of documentation after each release.

@mniewrzal mniewrzal added the documentation Improvements or additions to documentation label Feb 14, 2022
@mniewrzal
Copy link
Contributor Author

@Erikvv could you add more details how we can do this?

@Erikvv
Copy link
Contributor

Erikvv commented Mar 1, 2022

High level:

  • Make sure jenkins builds the latest tag when tagging, doesn't seem like it currently does anything with tags.
  • Set the tag in
    PROJECT_NUMBER = v1.5.1
    (for CI replace with environment variable)
  • run ./docs/generate.sh
  • commit and push the branch gh-pages from directory ./docs/gh-pages

Note: we currently only host documentation for one tag, which would have to be the latest. I was looking at processing the Doxygen XML output with Breath+Sphinx to support this and maybe other improvements.

@egonelbre
Copy link
Member

egonelbre commented Mar 1, 2022

Note, it might be easier to do with github actions.

You can setup a github action something like:

name: Generate Docs
on:
  push:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      // -- install tools --
      // -- generate docs --

      - name: Publish
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public
          force_orphan: true

Adjust the publish_dir as needed.

@egonelbre
Copy link
Member

Also, I think ideally we would want to generate the docs for all versions.

But, in general, since the docs are minimal here, I would stuff together a golang templates rather than creating a huge documentation pipeline.

@Erikvv
Copy link
Contributor

Erikvv commented Mar 2, 2022

egon:
I would stuff together a golang templates

What do you mean by this?

@egonelbre
Copy link
Member

Rather than requiring Doxygen + other stuff, it shouldn't be too difficult to put together html/template + use a C header parser to generate a docs page. Or use Go ast and syntax analysis directly to figure out the C data-structures. Might be a fun innovation time project.

But, using Doxygen is also completely fine.

@Erikvv
Copy link
Contributor

Erikvv commented Jun 8, 2022

So to scope the issue:

@Erikvv
Copy link
Contributor

Erikvv commented Jul 29, 2022

I tried out the Doxygen+Breathe+Sphinx pipeline to generate better docs for Uplink-C than pure Doxygen. I didn't want to start on this issue before investigating this.

My conclusion is that these are good tools when you want to put effort to write very good documentation like on readthedocs.io and still be able to reference structs and functions in the code, but it is a regression in terms of automatic generation of API docs. If anyone wants to put in the effort I can certainly recommend it, I have a branch saved.

So I should just do what I described before to automate Doxygen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

4 participants