BookSource Update #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BookSource Update | |
on: | |
schedule: | |
- cron: '0 0 */3 * *' # 每三天午夜运行 | |
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 |