Skip to content

Optimize article layout #61

Optimize article layout

Optimize article layout #61

Workflow file for this run

name: Build Sphinx Docs
on:
push:
branches: [ main ] # 当 main 分支有更新时触发
pull_request:
branches: [ main ] # 当有 PR 指向 main 分支时触发
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Clean
run: make clean
- name: Build HTML
run: make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/main'
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/html
publish_branch: gh-pages
force_orphan: true