Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/dispatch-site.yaml
Original file line number Diff line number Diff line change
@@ -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.2.0

dispatch:
needs: validate
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.SITE_DISPATCH_TOKEN }}
repository: CGIAR-Climate-Data-Hub/climate-data-hub
event-type: records-updated
Loading