Some checks failed
Deploy on webserver / Build site and deploy on success (push) Failing after 0s
34 lines
1.1 KiB
YAML
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 )
|