Closed woutdenolf closed 2 years ago
@prjemian Is CI still not building the documentation as it is done locally?
In my local build (make local
):
(bluesky_2022_3) prjemian@zap:~/.../NeXus/definitions$ ls ./build/manual/build/html/CNAME
./build/manual/build/html/CNAME
That was for the dev_tools
branch., Checking with main branch now.
On main branch, with make local
:
(bluesky_2022_3) prjemian@zap:~/.../NeXus/definitions$ ls ./build/manual/build/html/CNAME
ls: cannot access './build/manual/build/html/CNAME': No such file or directory
The CNAME is created https://github.com/nexusformat/definitions/blob/1ac17ef55af511113458699889691d28052a8d58/.github/workflows/publish-sphinx.yml#L79-L81
and then the build/manual/build
directory is re-written by https://github.com/nexusformat/definitions/blob/1ac17ef55af511113458699889691d28052a8d58/.github/workflows/publish-sphinx.yml#L83-L87
This second step deletes the CNAME file, correct?
Also note the default branch of sphinx-notes/pages Actions is v2
.
I think we should add a job that builds the html, copies the CNAME file to the resulting folder and then Build (html) and Commit
. The last one build the html again I guess but should start from the already existing build.
Right. Our publishing steps might be too complicated for sphinx-notes/pages.
Yes, so the point is that CNAME needs to be added to the result of an HTML build. In other words it needs to be copied afterward the sphinx HTML build.
I have two potential fixes: https://github.com/nexusformat/definitions/pull/1158 and https://github.com/nexusformat/definitions/pull/1157
Of course we need to run the publishing CI to check which one works. I propose to merge #1158 first and wait for CI.
Either that or suspend the rules, temporarily. This time, merge.
Ok so https://github.com/nexusformat/definitions/pull/1158 doesn't work, probably because sphinx-notes/pages
is not building in the normal directory. I see this
The HTML pages are in ../../../../../tmp/pages-gVzbCR6Kc2.
But I'm not sure the build is actually done in there are the build is just copied there.
After sphinx-notes/pages
runs its part, which branch is the CI process now? If it has switched to gh-pages
this step could be easier.
Maybe https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path is also an option. I'll investigate ...
From the workflow log, steps 198-201
Setting up git repository
Setting up git configure
No local changes to save
Setting up branch gh-pages
Branch exists, checkout to it
Switched to a new branch 'gh-pages'
branch 'gh-pages' set up to track 'origin/gh-pages'.
Removing build/
Removing utils/
Committing HTML documentation
Deleting all file in repository
removed 'CNAME'
From raw logs:
2022-06-30T19:11:10.8519755Z removed 'utilities.html'
2022-06-30T19:11:10.8519991Z removed 'validation.html'
2022-06-30T19:11:10.8520229Z Copying HTML documentation to repository
2022-06-30T19:11:10.8520826Z '/tmp/pages-oW788h6erK/./.doctrees/applying-nexus.doctree' -> '././.doctrees/applying-nexus.doctree'
2022-06-30T19:11:10.8521367Z '/tmp/pages-oW788h6erK/./.doctrees/authorgroup.doctree' -> '././.doctrees/authorgroup.doctree'
...
2022-06-30T19:11:10.9211990Z '/tmp/pages-oW788h6erK/./_static/sphinxdoc.css' -> '././_static/sphinxdoc.css'
2022-06-30T19:11:10.9212227Z '/tmp/pages-oW788h6erK/./_static/navigation.png' -> '././_static/navigation.png'
2022-06-30T19:11:10.9212484Z '/tmp/pages-oW788h6erK/./_static/nxdl_vocabulary.html' -> '././_static/nxdl_vocabulary.html'
2022-06-30T19:11:10.9212830Z '/tmp/pages-oW788h6erK/./_static/NeXusIntern.pdf' -> '././_static/NeXusIntern.pdf'
2022-06-30T19:11:10.9213087Z '/tmp/pages-oW788h6erK/./_static/nxdl_vocabulary.yml' -> '././_static/nxdl_vocabulary.yml'
So instead of
echo manual.nexusformat.org > ./build/manual/build/html/CNAME
then perhaps this will work:
echo manual.nexusformat.org > ./CNAME
html_extra_path works locally (PR #1159) so hopefully CI will like it as well.
I see this line in the raw workflow logs:
2022-06-30T19:38:14.3785167Z '/tmp/pages-baY42JJDDi/./CNAME' -> '././CNAME'
Indeed. Seems ok now:
https://github.com/nexusformat/definitions/runs/7138369879?check_suite_focus=true
I will do the same on the dev_tools
branch.
https://github.com/nexusformat/definitions/runs/7137146695?check_suite_focus=true