manubot / catalog

Made with Manubot catalog (please add your manuscript!!)
https://manubot.org/catalog/
Creative Commons Zero v1.0 Universal
12 stars 21 forks source link

Travis CI builds have been disabled #48

Closed dhimmel closed 3 years ago

dhimmel commented 3 years ago

Looking at https://travis-ci.com/github/manubot/catalog I see:

Builds have been temporarily disabled for public repositories due to a negative credit balance. Please go to the Plan page to replenish your credit balance or alter your Consume paid credits for OSS setting.

Would be nice to switch to GitHub actions, but we will have to look into having this action trigger the website action.

dhimmel commented 3 years ago

More info on the change at https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing

agitter commented 3 years ago

we will have to look into having this action trigger the website action

A quick search gave a few leads:

The peter-evans/repository-dispatch action looks like the best choice initially because it is maintained and supports a payload. aurelien-baudet/workflow-dispatch has support to wait for an workflow triggered in another repository to complete, which is a nice feature but not needed here. ph-fritsche/action-dispatch supports workflow or repository events. GitHub describes the difference as

You can manually trigger workflow runs. To trigger specific workflows in a repository, use the workflow_dispatch event. To trigger more than one workflow in a repository and create custom events and event types, use the repository_dispatch event.

We'll eventually need to migrate the other manubot organization repositories as well: https://travis-ci.com/github/manubot

dhimmel commented 3 years ago

I switched this repo and the website to GitHub Actions and revoked the Travis CI permissions for those repos. See the GitHub workflows at:

Both workflows are scheduled to run once per week. I scheduled the manubot.org build to be an hour after the catalog build. Currently, did not set up repository dispatch.

The manubot.org job is super fast (40 seconds), so we could schedule it daily. It was nice to have the website update quickly after a manuscript is added. So perhaps we should look into repository dispatch.

agitter commented 3 years ago

This is a nice solution. Using the GitHub Pages action instead of the deploy script simplifies the workflow considerably.

If we change the manubot.org builds to run daily, that would be a reasonable alternative to repository dispatch-triggered builds. Triggered builds would be easy to set up now that you've switched both workflows the GitHub Actions. The only downside is that we would need to add a personal access token instead of using the GITHUB_TOKEN.

dhimmel commented 3 years ago

Okay I set up the repository dispatch in https://github.com/manubot/catalog/commit/48d40a4c795cbeb1d87ef7eb5a810fd3b044d998 and https://github.com/manubot/manubot.org/commit/6ec28efc5070ca19a39a15713c418e2a2a1844b2. I renamed @manubot-catalog-travis-bot to @manubot-org-bot, which is a GitHub account that only has write access to https://github.com/manubot/manubot.org. This way we don't have to worry about the broad scope of the repo PATs.

See the CI builds at

Slight worry that there is not enough of a delay, such that https://manubot.github.io/catalog/catalog.json won't have started serving the new data yet. Will see if this is a problem.