检查链接有效性 #44
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: 检查链接有效性 | |
on: | |
schedule: # 夜间执行 | |
- cron: '0 0 * * *' | |
workflow_dispatch: # 手动执行 | |
pull_request: # PR执行 | |
branches: | |
- main | |
push: # Push到main执行 | |
branches: | |
- main | |
jobs: | |
check-url: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出代码 | |
uses: actions/checkout@v4 | |
- name: 设置 Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: 安装依赖 | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: 检查链接有效性 | |
run: python ./.action_scripts/link_checker.py |