Skip to content

Conversation

@crandmck
Copy link
Collaborator

@crandmck crandmck commented Nov 10, 2025

Add a worfkow to publish doc on each release.

  • Remove the generated .md doc files from the repo.
  • Add workflow to automatically rebuild the docs 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

@crandmck crandmck marked this pull request as draft November 10, 2025 17:53
@crandmck crandmck changed the title First take on docs wf Add docs publish workflow Nov 10, 2025
@crandmck crandmck changed the title Add docs publish workflow docs: Add docs publish workflow Nov 10, 2025
@crandmck crandmck marked this pull request as ready for review November 10, 2025 21:39
Comment on lines +51 to +52
pnpm run build:docs
rm -rf docs-typedoc
Copy link

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?

Copy link
Collaborator Author

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?

Copy link

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

@crandmck crandmck merged commit b7b66cc into main Nov 11, 2025
3 checks passed
@crandmck crandmck deleted the add-doc-publish-wf branch November 11, 2025 18:43
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