NCEAS / learning-hub-organization

This repo uses GitHub projects to manage Learning Hub tasks that Learning Hub Team Leads work on
0 stars 0 forks source link

refactor GHA book build for speed and to support dataone package #71

Closed mbjones closed 3 months ago

mbjones commented 1 year ago

The DataONE package (dataone) is not successfully being installed in the current book build due to system library incompatibilities. In addition, the book build is really long (at times 30-60 minutes), which seriously impedes writing flow. Finally, much of the logic of the build is an shell script that originated before many of the modern and maintained Actions were created, so it would be good to remove it in favor of putting the whole build in GHA. Refactor the book to:

mbjones commented 1 year ago

Started implementation on this, and completed most of it. The cached build now takes about 4 minutes, and installs the dataone requirements. The full build now uses the Posit binary package repository, which massively speeds up the deploy. Some other changes:

While not everything is complete here, its a lot closer to what we need, so I'm merging what I have now in the develop branch into main at sha d16918dff954e. We can return to the other items and refactoring the rest of the _build shell script later.

One other item to add in:

mbjones commented 1 year ago

Watching the build, I see that another source of slow turnaround is the async publication to GutHub pages as a separate build step. It looks like it is spending all of its time uploading a large artifact file that has all of the books built over time. There would be much faster ways to do this if we deployed locally, by only building and deploying new materials, and keeping older materials the same as they were originally. And this could be sped up by using rsync rather than an entire artifact file. I'll try to come back to this part of the deploy later:

hdolinh commented 10 months ago

Refactored the build so that branch name no longer has to be hardcoded. Instead it's sent from nceas-training http repo dispatch request