Skip to content

Commit cac7233

Browse files
committed
为actions安装依赖
1 parent 33df65f commit cac7233

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy MkDocs to GitHub Pages with local extension
2+
3+
on:
4+
push:
5+
branches:
6+
- main # 或你的默认分支
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
pip install -e ./extensions # 安装本地 MkDocs 扩展
26+
27+
- name: Build and deploy MkDocs
28+
run: |
29+
mkdocs gh-deploy --force

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs
2+
mkdocs-material

0 commit comments

Comments
 (0)