Publish GraalPy Embedding javadocs to gh-pages branch#53
Publish GraalPy Embedding javadocs to gh-pages branch#53fniephaus merged 6 commits intooracle:release/graal-vm/25.0from
Conversation
| @@ -0,0 +1,41 @@ | |||
| name: Publish GraalPy Embedding API Docs | |||
There was a problem hiding this comment.
@steve-s , @fniephaus , @timfel please review
There was a problem hiding this comment.
The workflow won't run against the main branch because Maven can't find GraalPy artifact version 25.1.
Next steps, if I understand well, are:
- Add .github/workflows/apidocs.yml to the
mainbranch too; - Create and push an orphan
gh-pagesbranch with some placeholder(GA can't push to a branch that doesn’t exist yet.) - Go to Settings under this main repository -> Pages -> Deploy from a branch -> select
gh-pages
@fniephaus, does it sound right?
There was a problem hiding this comment.
.github/workflows/apidocs.yml
Outdated
|
|
||
| - name: Copy over GraalPy API Docs | ||
| run: | | ||
| echo "Hello" > gh-pages/index.html |
There was a problem hiding this comment.
looks like leftover debugging code?
There was a problem hiding this comment.
Yes, now it's gone. Thank you!
.github/workflows/apidocs.yml
Outdated
| @@ -0,0 +1,41 @@ | |||
| name: Publish GraalPy Embedding API Docs | |||
| on: [push] | |||
There was a problem hiding this comment.
Maybe this can be:
on:
push:
branches:
- "release/**"
and we can push the workflow also to master (from which we'll be branching future release branches too)
.github/workflows/apidocs.yml
Outdated
|
|
||
| - name: Copy over GraalPy API Docs | ||
| run: | | ||
| cp -R org.graalvm.python.embedding/target/reports/apidocs/* gh-pages/ |
There was a problem hiding this comment.
Similar to the NBTs, we should deploy into a version-specific subdirectory. Not sure how to best determine the concrete version. Maybe @steve-s has an idea?
There was a problem hiding this comment.
./mvnw help:evaluate -Dexpression=revision -q -DforceStdout
gives out the version including -SNAPSHOT if present. On the release branch it should give 25.0.2. So something like this can work (depending on the directory structure we want):
cp -R org.graalvm.python.embedding/target/reports/apidocs/* gh-pages/$(./mvnw help:evaluate -Dexpression=revision -q -DforceStdout)
| - name: Build GraalPy Embedding API docs with commit ID | ||
| run: | | ||
| ./mvnw -pl org.graalvm.python.embedding -am -DskipTests package javadoc:javadoc | ||
| COMMIT=$(git rev-parse --short HEAD) |
There was a problem hiding this comment.
@fniephaus, this modification will print the exact version and commit ID in the doc header, like this:
Is that what we want to achieve? Similar to https://www.graalvm.org/25.0/javadoc/sdk/
There was a problem hiding this comment.
Plus the apidocs will be placed in a version-specific directory:
https:///.../graalpy-extensions/25.0.2/org.graalvm.python.embedding/module-summary.html
Add a workflow that will build publish only GraalPy Embedding javadocs to the

gh-pagesbranchRun only on push action to
release/graal-vm/25.0Tested the workflow from this fork and the pages are published as expected at https://olyagpl.github.io/graalpy-extensions/org.graalvm.python.embedding/module-summary.html:
Task: GR-71198