Create LICENSE #6
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: GitHub Pages | |
on: | |
push: | |
branches: ["main"] | |
# 权限 | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
pip install sphinx | |
pip install sphinx-rtd-theme | |
pip install sphinx-autodoc-typehints | |
pip install myst-parser | |
- name: Build Sphinx documentation | |
run: | | |
sphinx-build -b html docs build | |
# 创建 .nojekyll 文件以允许下划线开头的文件夹 | |
touch build/.nojekyll | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build |