-
Notifications
You must be signed in to change notification settings - Fork 2
docs: Add docs publish workflow #32
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
Conversation
| pnpm run build:docs | ||
| rm -rf docs-typedoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happening here exactly - do we build the docs and then remove the directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deletes the md files that typedoc generates in the docs-typedoc directory. Jekyll then processes these into HTML files, which are what GHP serves.
However, I notice that the build:docs script in package.json already does this--twice actually (added newlines for readability):
"build:docs": "rimraf docs-typedoc &&
typedoc --plugin typedoc-plugin-markdown --readme README.md --out docs-typedoc js-src/index.ts &&
cpy \"docs-typedoc/**\" docs --parents --overwrite --ignore=\"docs-typedoc/classes/index.md\" --ignore=\"docs-typedoc/README.md\" &&
rimraf docs-typedoc",
Not sure why there are two rimraf docs-typedoc commands there...
But I think we could probably remove all but one of these. Is it better to do it in the workflow or in the pnpm script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do as much in the workflow as is possible.
Question - is it necessary to do an intermediate markdown step?
I only ask because we don't bother with that in the web SDK. We just build directly to HTML and push that to GHP: https://github.com/contentauth/c2pa-js/blob/main/.github/workflows/publish-docs.yml#L38-L44
Add a worfkow to publish doc on each release.
Note: This will require keeping the handful of existing Jekyll scaffolding files which in general won't need to change.
I believe this will replace #29