-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.66 KB
/
create-graph.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Create graph
# Once per week
on:
schedule:
- cron: "0 0 * * 0"
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout data repository
uses: actions/checkout@v4
with:
path: ./data
sparse-checkout: bodleian
- name: Checkout code repository
uses: actions/checkout@v4
with:
path: ./code
repository: colonial-heritage/integration-layer
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install app
run: |
cd ./code
npm install --no-progress
npx turbo run build --filter=@colonial-collections/graph-create-iiif
- name: Create graph
run: |
cd ./data
mkdir -p "$RUNNER_TEMP"
test -f ./bodleian/data/data.tar.zst && tar --zstd -xf ./bodleian/data/data.tar.zst -C "$RUNNER_TEMP"
../code/apps/graph-create-iiif/dist/cli.js create \
--resource-dir ./bodleian/resources \
--data-file "$RUNNER_TEMP/data.sqlite" \
--iterate-endpoint-url "https://iiif.bodleian.ox.ac.uk/iiif/activity/all-changes"
- name: Save changes
run: |
cd ./data
mkdir -p ./bodleian/data
test -f "$RUNNER_TEMP/data.sqlite" && tar --zstd -cf ./bodleian/data/data.tar.zst -C "$RUNNER_TEMP" data.sqlite
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