Fix: path error #5
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: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '*/5 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python 3.12 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
# Step 3: Install dependencies from requirements.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# Step 4: Run tinystatus.py and stop it after 1 minute | |
- name: Run tinystatus.py and stop after 1 minute | |
run: | | |
timeout 60s python tinystatus.py | |
continue-on-error: true | |
# Step 5: Commit and push the contents of ./output to the gh-pages branch | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./output # 静态导出文件夹路径 | |
force_orphan: true # 确保 gh-pages 分支不会出现冲突 |