Skip to content

欢迎来到电子书下载宝库,一个汇聚了各类电子书下载链接的地方。无论你是喜欢阅读经典文学、经管励志、终身学习、职场创业、技术手册还是其他类型的书籍,这里都能满足你的需求。 该库涵盖了帆书app(原樊登读书)、微信读书、京东读书、喜马拉雅等读书app的大部分电子书。

Python

Update GitHub Actions workflow for site generation

小坏猪猪1dd7d2ffb1cb
diff --git a/.github/workflows/generate-site.yml b/.github/workflows/generate-site.yml
index acbdc09..b6c4d04 100644
--- a/.github/workflows/generate-site.yml
+++ b/.github/workflows/generate-site.yml
@@ -1,30 +1,39 @@
-name: Generate Site
+name: Generate Index
on:
push:
branches:
- main
- workflow_dispatch:
-
-permissions:
- contents: write
+ paths:
+ - "metadata/**"
+ - "scripts/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - name: Checkout repo
+ uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - name: Setup Python
+ uses: actions/setup-python@v5
with:
- python-version: '3.11'
+ python-version: "3.10"
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install pyyaml
- - run: python scripts/generate_index.py
+ - name: Generate index.md
+ run: |
+ python scripts/generate_index.py
- - run: |
- git config user.name "github-actions"
- git config user.email "[email protected]"
- git add docs/
- git commit -m "auto-generate site" || echo "no changes"
+ - name: Commit and push changes
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add docs/index.md
+ git commit -m "auto: update index.md" || echo "No changes"
git push