From e48852fe96758b878c161b61ca5d358bd5326360 Mon Sep 17 00:00:00 2001 From: Brayden Youngberg Date: Fri, 10 Jul 2026 18:44:45 +0200 Subject: [PATCH 1/3] Notify the site to rebuild when records change on main Co-Authored-By: Claude Fable 5 --- .github/workflows/dispatch-site.yaml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/dispatch-site.yaml diff --git a/.github/workflows/dispatch-site.yaml b/.github/workflows/dispatch-site.yaml new file mode 100644 index 0000000..6d74603 --- /dev/null +++ b/.github/workflows/dispatch-site.yaml @@ -0,0 +1,33 @@ +name: Notify site + +# Validate everything on main, then tell the site repo to rebuild. Requires +# the SITE_DISPATCH_TOKEN secret: a fine-grained PAT for the site repo with +# "Contents: read and write" permission. +on: + push: + branches: [main] + paths: ["records/**"] + +permissions: + contents: read + +jobs: + # Full-set validation of main's records — the dispatch only fires when the + # state the site will fetch is valid (PR validation is the first gate; this + # covers direct pushes and anything that slipped through). + validate: + uses: CGIAR-Climate-Data-Hub/cdh-metadata-standard/.github/workflows/validate-records.yaml@main + with: + path: records + changed-only: false + tooling-ref: v0.1.0 + + dispatch: + needs: validate + runs-on: ubuntu-latest + steps: + - uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.SITE_DISPATCH_TOKEN }} + repository: CGIAR-Climate-Data-Hub/climate-data-hub + event-type: records-updated From 612f66fcc41661642060a3f2db51c4e80a880932 Mon Sep 17 00:00:00 2001 From: Brayden Youngberg Date: Fri, 10 Jul 2026 18:52:31 +0200 Subject: [PATCH 2/3] Bump repository-dispatch to v4 Co-Authored-By: Claude Fable 5 --- .github/workflows/dispatch-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-site.yaml b/.github/workflows/dispatch-site.yaml index 6d74603..a76ded0 100644 --- a/.github/workflows/dispatch-site.yaml +++ b/.github/workflows/dispatch-site.yaml @@ -26,7 +26,7 @@ jobs: needs: validate runs-on: ubuntu-latest steps: - - uses: peter-evans/repository-dispatch@v3 + - uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.SITE_DISPATCH_TOKEN }} repository: CGIAR-Climate-Data-Hub/climate-data-hub From 2bc2b251137187f7b178cbe30a02158898cd7308 Mon Sep 17 00:00:00 2001 From: Brayden Youngberg Date: Fri, 17 Jul 2026 18:43:01 +0200 Subject: [PATCH 3/3] chore: bump metadata validation to latest metadata version --- .github/workflows/dispatch-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-site.yaml b/.github/workflows/dispatch-site.yaml index a76ded0..8821e47 100644 --- a/.github/workflows/dispatch-site.yaml +++ b/.github/workflows/dispatch-site.yaml @@ -20,7 +20,7 @@ jobs: with: path: records changed-only: false - tooling-ref: v0.1.0 + tooling-ref: v0.2.0 dispatch: needs: validate