Skip to content

Commit 07b53eb

Browse files
author
胡闰智
committed
add workflow for doc generation
1 parent 85374aa commit 07b53eb

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
# 👇 改为手动触发
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
reason:
8+
description: 'Build docs'
9+
required: false
10+
default: 'Manual deploy'
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.10
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install mkdocs
26+
pip install mkdocs-material
27+
28+
- name: Build site
29+
run: mkdocs build
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./site

docs/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins:
1111
- mkdocstrings:
1212
handlers:
1313
python:
14-
paths: [../] # 指向项目根目录以找到 tasgnsslib.py
14+
paths: [../]
1515
markdown_extensions:
1616
- pymdownx.arithmatex:
1717
generic: true

0 commit comments

Comments
 (0)