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
Generate apidoc on build #336
Conversation
nice, but can we leave the apidoc in the /apidoc directory, otherwise we can't use the static pages of github to serve it: https://opendatacam.github.io/opendatacam/apidoc/ ? |
Ah I have not thought about this. I believe with github actions there should be a way to render a static page on every commit and serve it without having to have the build artifacts in git :-) Will need to look into it first though. Update Quick googling found me https://github.com/marketplace/actions/github-pages-action for example. So it should be possible. Will update the PR when I get around :-) But you might need to look and check if the github pages settings are done correctly as I can not see or change any settings for the repository. |
okay ! just let me know what I need to do on the github page config and I'll do it 😎 |
It get's generated automatically at each build anyway.
d45856f
to
c1a83cd
Compare
c1a83cd
to
ca9cfb9
Compare
Don't assume it is installed globally
@tdurand I've updated the pull request to do the following: At any push in the For this action to work you will need to make the following changes to the repository
If you want to see this action run successfully visit https://github.com/vsaw/opendatacam/actions/runs/436279892. This run created the API documentation that you can see at https://vsaw.github.io/opendatacam/ (the HTML generated by apidoc can be found at the |
great ! only downside I see now (sorry) is that we will not have the nice Markdown as HTML like we had: https://opendatacam.github.io/opendatacam/ for the rest of the documentation.. but I think no one was reading the documentation there anyways.. And I think if we ever want to have a website for documentation it should be something a bit more usable than just the raw Markdown file as HTML.. something with a nice navigation menu 😁 So let's go , will try to merge this and setup correctly the github page ! |
With a bit more effort this can be implemented. We just need to call Jekyll or any static page generator and include the apidoc as a sub-page. Do you want me to fix this? |
If you don't mind would be nice to have to be able to link to the documentation outside github markdown. |
but let me know if it is not a quick fix and I'll go with this for now |
e90dda5
to
093ce0c
Compare
I've run into some undocumented behavior of GitHub. It seems that it does not automatically convert Markdown pages to HTML. So far I've only been able to do this on |
ee3f96c
to
fd1986f
Compare
fd1986f
to
65a9512
Compare
Got it working now. Apparently you can bypass GitHubs built in Jekyll, which the Action did (unknowingly). For proof of work see: See also https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/ |
Closes #334