odis-arch icon indicating copy to clipboard operation
odis-arch copied to clipboard

Create trigger to update book.oceaninfohub.org from master

Open jmckenna opened this issue 1 year ago • 2 comments

Status as I see it now:

  • there is a deploy-book GitHub action in this repo
  • it is currently triggered when a new push/commit is made into the publication branch (see yaml config)
  • however no updates to that publication branch have been made since 6 months ago - meaning that https://book.oceaninfohub.org/ is 6 months old, lacking all of the changes in that timeframe
  • a simple change to the yaml could be made to have the book deployed whenever a commit is made to the master branch, instead of the publication branch
  • in the long run, we cannot rely on manual deploy-book/merges made into publication, instead, we should set this up that it runs on its own

cc @fils @pbuttigieg for thoughts on how to have this run automatically

jmckenna avatar May 02 '24 13:05 jmckenna

As discussed, the published version should not be changed without review, but we do want to make that more rapid and automatic.

The solution is to use normative GH practice:

  • changes that affect the book should only be made on a branch linked to an issue
  • A PR should then be made and reviewed by the relevant parties (this will vary based on content, but I should have overview on all PRs at this stage).
  • Once the PR is approved, it can be merged into the master branch
  • That merge action - into the book directory of odis-arch master - should trigger the publish workflow

I think this will work.

I'm less sure on how the relationship with odis-in embeds works here. If they change, this may not be picked up by the process above.

This shoud be okay as long as editing on odis-in content is very disciplined and it remains a repo with low content variation in each of its directories

pbuttigieg avatar May 05 '24 10:05 pbuttigieg

updates:

  • added a new GitHub action that will merge master into the publication branch once a week, on Sundays (that then triggers a book rebuild)
  • weekly-publish.yml
    • we can easily change the schedule to daily or whatever we want
    • we can also easily now run that action manually, through the Actions menu above

jmckenna avatar Jun 10 '24 12:06 jmckenna

Is this done?

pbuttigieg avatar Dec 03 '24 10:12 pbuttigieg

yes, it is working well. Closing.

jmckenna avatar Dec 03 '24 13:12 jmckenna

More explanation:

  • now when a commit/push happens to master, a merge happens automatically to the publication branch, which triggers the Book to be rebuilt, and also the odis-in submodule is updated in this repo automatically.

jmckenna avatar Dec 03 '24 13:12 jmckenna