Files
infrastructure/.github/workflows/beets-sync.yml
2025-10-07 22:23:09 -06:00

23 lines
664 B
YAML

name: Beets
on:
schedule:
# Run 4 times a day: 6am, 12pm, 6pm, 12am UTC
- cron: '0 6,12,18,0 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
sync-beets:
runs-on: [home-server]
steps:
- name: Run Beets sync
working-directory: /home/github/infrastructure/infrastructure/home-server/beets
run: |
echo "Starting Beets audiobook sync at $(date)"
git pull
docker compose pull -q
docker compose up -d
docker compose restart
sleep 2
docker exec -u 1000 beets bash -c 'beet -v import -I -i -q /managed/*' || true
echo "Beets sync completed"