forked from q04/www.trr379.de
75 lines
2.7 KiB
YAML
75 lines
2.7 KiB
YAML
name: Create publication pages
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
create_pages:
|
|
runs-on: debian-latest
|
|
if: ${{ forgejo.repository == 'q04/www.trr379.de' }}
|
|
outputs:
|
|
committed: ${{ steps.commit.outputs.committed }}
|
|
|
|
steps:
|
|
- name: Checkout this
|
|
id: websitecheckout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
ref: main
|
|
get_file_content: false
|
|
recursive: false
|
|
|
|
- name: Checkout code
|
|
id: codecheckout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: q02/pool-publication-page
|
|
get_file_content: false
|
|
path: code
|
|
|
|
- name: Download extra data
|
|
id: datacheckout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: https://hub.trr379.de/q02/pool-publication-page
|
|
path: /tmp/extradata
|
|
get_content: v2.2-2026-01-29-ror-data.parquet
|
|
|
|
- name: Install uv
|
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
- name: Install qrg & dtc suites
|
|
run: |
|
|
uv tool install https://hub.psychoinformatics.de/datalink/query-rse-group.git
|
|
uv tool install dump-things-pyclient
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "Forgejo Actions"
|
|
git config --global user.email "forgejo-actions@hub.trr379.de"
|
|
git config --global credential.helper cache
|
|
git credential approve <<EOF
|
|
url=${{ forgejo.server_url }}
|
|
username=${{ forgejo.actor }}
|
|
password=${{ forgejo.token }}
|
|
EOF
|
|
echo OK
|
|
|
|
- name: Process metadata
|
|
run: |
|
|
cd ${{ steps.codecheckout.outputs.path }}
|
|
uv sync --locked
|
|
dtc read-pages https://pool.v0.trr379.de/api/public/records/p/TRR379Project > /tmp/projects.jsonl
|
|
dtc read-pages https://pool.v0.trr379.de/api/public/records/p/TRR379Person \
|
|
| qrg inline-records --api-url https://pool.v0.trr379.de/api/ -c public -p delegated_by \
|
|
| uv run filters/join-association.py --inline --pop --field-name x_associated_projects - /tmp/projects.jsonl associated_with \
|
|
| uv run filters/infer-site.py - ${{ steps.datacheckout.outputs.path }}/v2.2-2026-01-29-ror-data.parquet - \
|
|
| uv run person.py - ${{ steps.websitecheckout.outputs.path }}/content/contributors
|
|
|
|
- name: Commit and push updates
|
|
id: commit
|
|
run: |
|
|
git add content/contributors
|
|
git commit -m "Auto-update publications" && result=t || result=nil
|
|
git push origin
|
|
echo "committed=${result}" >> $FORGEJO_OUTPUT
|