Skip to content

Restore documentation on github pages with Doxygen generated doc#734

Merged
riri merged 5 commits into
Immediate-Mode-UI:masterfrom
riri:master
Nov 18, 2024
Merged

Restore documentation on github pages with Doxygen generated doc#734
riri merged 5 commits into
Immediate-Mode-UI:masterfrom
riri:master

Conversation

@riri
Copy link
Copy Markdown
Contributor

@riri riri commented Nov 18, 2024

This is an attempt to fix issue #730 since the original gh-pages branch is not fed anymore (with .gitignore changes).

I'm not an expert at all with Doxygen and github actions, so that might need more work (help is welcome).

With this, a few hints:

  • I have removed README.md as start page, because it was not giving much and the Documentation link was conflicting, instead the start page is made from src/HEADER.md
  • The build generates a lot of warnings and errors. I suppose warnings can be fixed in the future from source files. Errors seem to come from the missing dot command (an additional package might be added to the required docker image before running doxygen)
  • Once merged, Pages settings of the repository need to be changed because the generated doc is done in the root of the gh-pages branch (and not /docs anymore). This is how I have setup my fork :

Change in the folder to be used as root for pages

The result can be seen on my fork deployed pages :)

Copy link
Copy Markdown
Contributor

@RobLoach RobLoach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a much better approach. I have access to https://github.com/Immediate-Mode-UI/Nuklear/settings/pages if you're missing it to make the change afterwards.

@riri riri merged commit 7c77328 into Immediate-Mode-UI:master Nov 18, 2024
@awschult002
Copy link
Copy Markdown
Contributor

i know that this is already merge, but i decided to give a read through since my name was mentioned in the issue #730.

First thing. Thank you for handling the issue. This definitely fixed the issue. but i do have a couple questions/notes

I am not super familiar with github pages, so i am going to have to do some reading; but i really do like the feature and the automated workflow. My only concern with this PR is it appears that the published documents are not on master; but instead published from the gh-pages branch. and the gh-branch has all of the docs in the root folder. I am not sure how you managed that; but at least it is working for now.

I would recommend that we try to move our publishing to be based directly off master and change its root directory to /docs/html . That way, we have minimal changes required when pushing a new update. I will do some testing on my end to see what I can learn about github pages.

Thank you again for the quick fix.

@riri
Copy link
Copy Markdown
Contributor Author

riri commented Nov 18, 2024

In fact it's simple once the github action is made. It's a two parts process:

  1. automatic generation is done through github action which exactly processes like testing builds (on CI) in a temporary docker image created for this job (it's not retained). Then automatic deployment of generated content to github page is done via another step in the job. Historically it has been a commit in the gh-pages branch
  2. Project pages is configured to check the content from one branch (gh-pages) in a specific directory (/ (root) or /docs)

The interest of having generated content in a specific branch is.... it does not pollute the master branch, otherwise we would need an extra commit each time something is pushed in master (or rely on people re-generate the docs before PR, but we can't rely on that).

And it's all automated with CI: each push on master triggers documentation generation and update of github.io.

@awschult002
Copy link
Copy Markdown
Contributor

Thank you for the insight. I did some research into the actions and pages. I just posted a PR that continues to use actions, but removes the need for HTML to be committed at all. The actions handle the generation and the artifact uploading and deployment automatically. PR #737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants