Skip to content

Commit a6b44bb

Browse files
committed
change in toc and pages
1 parent d79f92c commit a6b44bb

File tree

2 files changed

+23
-29
lines changed

2 files changed

+23
-29
lines changed

.github/workflows/github_pages.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,45 @@ on:
66
- master
77
- main
88

9+
permissions:
10+
pages: write
11+
id-token: write
12+
913
jobs:
1014
deploy-book:
1115
runs-on: ubuntu-latest
12-
permissions:
13-
pages: write
14-
id-token: write
16+
1517
steps:
16-
# 拉取仓库
17-
- uses: actions/checkout@v4
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
1820

19-
# 设置 Python 3.11
2021
- name: Set up Python 3.11
2122
uses: actions/setup-python@v5
2223
with:
2324
python-version: '3.11'
24-
cache: pip
25-
26-
# 安装依赖
27-
- name: Install dependencies
28-
run: |
29-
cd "DSPC6000/Computing in Context/carlboy2002.github.io"
30-
pip install --upgrade pip
31-
pip install -r requirements.txt
25+
cache: 'pip'
3226

33-
# 可选:缓存执行过的 notebooks
34-
- name: Cache executed notebooks
27+
- name: Cache pip dependencies
3528
uses: actions/cache@v4
3629
with:
37-
path: DSPC6000/Computing in Context/carlboy2002.github.io/_build/.jupyter_cache
38-
key: jupyter-book-cache-${{ hashFiles('DSPC6000/Computing in Context/carlboy2002.github.io/requirements.txt') }}
30+
path: ~/.cache/pip
31+
key: pip-cache-${{ runner.os }}-requirements-${{ hashFiles('requirements.txt') }}
32+
restore-keys: |
33+
pip-cache-${{ runner.os }}-
3934
40-
# 构建 Jupyter Book
41-
- name: Build the book
35+
- name: Install dependencies
4236
run: |
43-
cd "DSPC6000/Computing in Context/carlboy2002.github.io"
44-
jupyter-book build .
37+
python -m pip install --upgrade pip
38+
pip install -r requirements.txt
4539
46-
# 上传构建好的 HTML
47-
- name: Upload artifact
40+
- name: Build Jupyter Book
41+
run: jupyter-book build .
42+
43+
- name: Upload built site
4844
uses: actions/upload-pages-artifact@v3
4945
with:
50-
path: "DSPC6000/Computing in Context/carlboy2002.github.io/_build/html"
46+
path: _build/html
5147

52-
# 部署到 GitHub Pages
5348
- name: Deploy to GitHub Pages
5449
id: deployment
5550
uses: actions/deploy-pages@v4
56-

_toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ format: jb-book
22
root: index
33
chapters:
44
- file: Project_1
5-
- file: 0928_webpage_summarizer.ipynb
6-
- file: 1025_brochure_generator.ipynb
5+
- file: 0928_webpage_summarizer
6+
- file: 1025_brochure_generator

0 commit comments

Comments
 (0)