Skip to content

BookSource Update

BookSource Update #40

name: BookSource Update
on:
schedule:
- cron: '0 0 */4 * *' # 每四天午夜运行
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
env:
BOOK_SOURCE_PATH: 'http://mirror.ghproxy.com/https://raw.githubusercontent.com/shidahuilang/shuyuan/shuyuan/good.json'
OUTPUT_PATH: './output/'
WORKERS: '64'
DEDUP: 'true'
FILTER: 'false'
KEYWORDS_TO_FILTER: ''
run: python app.py
- name: Commit and push if changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Update book sources" -a || exit 0
git push