Create graph #92
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: Process changes | |
on: | |
schedule: | |
- cron: "30 5 * * *" | |
jobs: | |
process-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout data repository | |
uses: actions/checkout@v4 | |
with: | |
path: ./data | |
- name: Checkout code repository | |
uses: actions/checkout@v4 | |
with: | |
path: ./code | |
repository: colonial-heritage/integration | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install and build packages | |
run: | | |
cd ./code | |
npm ci | |
npm run build | |
- name: Fetch IRIs of changed resources | |
run: | | |
cd ./data | |
../code/packages/iiif-change-processor/dist/cli.js fetch \ | |
--collection-iri "https://iiif.bodleian.ox.ac.uk/iiif/activity/all-changes" \ | |
--file-with-run "./run.nt" \ | |
--file-with-metadata "$RUNNER_TEMP/metadata.csv" \ | |
--dir-with-queue "./queue" \ | |
--number-of-lines-per-file-with-metadata 5000 \ | |
--wait-between-requests 0 | |
- name: Process changed resources | |
run: | | |
cd ./data | |
../code/packages/iiif-change-processor/dist/cli.js process \ | |
--dir-with-queue "./queue" \ | |
--dir-with-resources "./resources" \ | |
--wait-between-requests 0 \ | |
--number-of-concurrent-requests 25 | |
- name: Save changed resources to repository | |
run: | | |
cd ./data | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit --quiet -a -m "Save changes" || true | |
git push --force -u origin |