更新ol action #1
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: Generate ol.html | |
on: | |
push: | |
branches: [ main ] # 触发分支(可自定义) | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Generate ol.html with dynamic URL | |
run: | | |
# 生成 ol.html, 并替换 URL 为变量值 | |
echo '<meta http-equiv="refresh" content="0; url=${{ vars.YATCC-AI-STU-WEB }}" />' > ol.html | |
- name: Deploy to GitHub Pages (可选) | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./ # 发布当前目录(包含 ol.html) |