doc action test #7
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 and Deploy HTML | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' # 选择合适的 Python 版本 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install jinja2 # 假设所有依赖都列在这个文件中 | |
- name: Run script to generate HTML | |
run: python docs/generate_html.py | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/html |