6d12eb4aef
- Add GitHub Actions workflow for monthly update checks - Add maintenance guide with backup/restore procedures - Add backup metadata and summary Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Law Library Update Monitor
|
|
|
|
on:
|
|
schedule:
|
|
# 每月1日凌晨2点运行
|
|
- cron: '0 2 1 * *'
|
|
workflow_dispatch:
|
|
# 手动触发
|
|
|
|
jobs:
|
|
check-updates:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install psycopg-binary
|
|
|
|
- name: Check law updates
|
|
env:
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
run: |
|
|
python scripts/check_law_updates.py
|
|
|
|
- name: Upload report
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: update-check-report
|
|
path: project-docs/phase14-legal-fulltext-library/update-check-report.json
|
|
|
|
- name: Notify on updates
|
|
if: steps.check.outputs.has_updates == 'true'
|
|
run: |
|
|
echo "New laws detected! Check the report artifact for details." |