All checks were successful
CI / lint (push) Successful in 40s
CI / notebooks-smoke (push) Successful in 1m26s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / mc (push) Has been skipped
Infra CI / notebooks (push) Successful in 1m10s
Infra CI / zotero (push) Successful in 13s
Infra CI / docs (push) Successful in 1m27s
Infra CI / api (push) Successful in 49s
Infra CI / mc (push) Successful in 13s
Deploy / report (push) Successful in 13s
CI / test (push) Successful in 16m10s
CMS listservs re-send identical mail with a fresh Message-ID, so the ingest correctly stores each send as a distinct Source and every sync pushes both — 10 such twin pairs had accumulated in Cmsupdates (removed by hand today). New bib.sync.dedupe_collection() groups a Zotero collection by (title, date), keeps the earliest copy, and deletes later ones from Zotero AND bib so the next sync can't resurrect them. Wired as --dedupe-collection on sync-zotero and passed by the nightly zotero-sync workflow. Runs under the same zotero-stopped lock window as the push.
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
# DO NOT EDIT — generated by gen_config.py from stack.toml
|
|
# Re-generate: uv run python dev/scripts/gen_config.py
|
|
|
|
name: Zotero Sync
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "15 4 * * *"
|
|
|
|
jobs:
|
|
zotero-sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Set up uv
|
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
env:
|
|
UV_INSTALL_DIR: /usr/local/bin
|
|
|
|
- name: Stop zotero (release SQLite write lock)
|
|
run: docker stop zotero
|
|
|
|
- name: Sync mail-ingested bib items into Zotero
|
|
# --dedupe-collection: CMS listservs re-send identical mail with
|
|
# fresh Message-IDs; the ingest correctly stores each send, so
|
|
# title+date duplicates accumulate unless swept here (keeps the
|
|
# earliest copy, removes later ones from Zotero AND bib).
|
|
run: |
|
|
docker exec api uv run --no-sync \
|
|
stack bib sync-zotero --tag source:email --no-hold \
|
|
--dedupe-collection Cmsupdates
|
|
|
|
- name: Restart zotero
|
|
if: always()
|
|
run: docker start zotero
|
|
|
|
- name: File failure issue
|
|
if: failure()
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
|
run: |
|
|
uv sync --no-dev --quiet 2>/dev/null || true
|
|
uv run python -m api.diag.ci \
|
|
--workflow "Zotero Sync" --job "zotero-sync" \
|
|
--run "${{ github.run_number }}" \
|
|
--sha "${{ github.sha }}" \
|
|
--ref "${{ github.ref }}" || true
|