www-from-model/.forgejo/workflows/update_publications_data.yaml
adina 329a2d093b
Some checks failed
Deploy on webserver / Build site and deploy on success (push) Failing after 0s
fix: don't use composite action that adds the wrong path
2026-04-01 10:37:59 +00:00

34 lines
1.1 KiB
YAML

name: Update publication pages
on:
schedule:
- cron: '0 2 * * 1-5'
workflow_dispatch:
env:
DUMPTHINGS_APIURL: https://pool.psychoinformatics.de/api
jobs:
create_pages:
runs-on: debian-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.forgejo/actions/prep-metadata-query
- name: Install jq
run: |
apt-get update
apt-get install -y jq
- name: Update pages
run: |
dtc get-records ${{ env.DUMPTHINGS_APIURL }} public -C XYZPublication \
| qri inline-records -p about -p attributed_to -c public \
| jq -sc '{pid: "xyzri:this-is-not-important", publications: .}' \
| qri render-record page_templates/publications.json.j2 'data/publications.json'
- name: Deposit changes
run: |
git add data
git diff --quiet --cached \
&& echo "Already up-to-date" \
|| ( git commit -m "chore: auto-generate content from metadata" && git push origin )