Nightly run to create export of all Allmaps annotations in the iiif.digitalcommonwealth.org domain #287
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly run to create export of all Allmaps annotations in the iiif.digitalcommonwealth.org domain | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
jobs: | |
nightly-download-allmaps-annotations: | |
name: Write annotations.json to LMEC digital library repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Use cURL to download | |
run: |- | |
curl -o ./allmaps/annotations.json "https://annotations.allmaps.org/maps?imageservicedomain=iiif.digitalcommonwealth.org&key=${{ secrets.ALLMAPS_API_KEY }}&limit=-1" | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Allmaps data export: ${timestamp}" || exit 0 | |
git push |