Skip to content

Commit 602e22d

Browse files
author
liuxinwei
committed
ci(workflow): 优化 GitHub Pages 工作流配置
- 添加 Harden Runner 步骤以增强安全性 - 简化 Python 和依赖项的安装流程 - 移除不必要的 TeXLive 安装步骤 - 添加 maple-font 的安装和构建步骤
1 parent 48141ed commit 602e22d

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/pages.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,31 @@ jobs:
2828
url: ${{ steps.deployment.outputs.page_url }}
2929
runs-on: ubuntu-latest
3030
steps:
31+
- name: Harden Runner
32+
uses: step-security/harden-runner@main
33+
with:
34+
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
3135
- name: Checkout
3236
uses: actions/checkout@main
33-
- name: 🐍 Set up Python 3
37+
- name: 🐍 Set up Python
3438
uses: actions/setup-python@main
3539
with:
3640
python-version: "3.12"
3741
cache: "pip"
3842
cache-dependency-path: "pyproject.toml"
39-
- name: Setup TeXLive
40-
uses: teatimeguest/setup-texlive-action@v3
41-
with:
42-
version: 2024
43-
packages: |
44-
scheme-basic
45-
hyperref
46-
microtype
47-
- name: 🔧 Build HTML
43+
- name: 🔧 PyPI 配置
4844
run: |
4945
sudo apt-get install graphviz
50-
sudo apt-get update && sudo apt-get upgrade
51-
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
46+
apt-get update && sudo apt-get upgrade
5247
pip install --upgrade pip
53-
pip install sphinxcontrib-websupport
54-
pip install .[doc,dev,flows] --upgrade
55-
conda install -c conda-forge pandoc compilers cppyy
56-
conda install -c conda-forge ffmpeg manim
57-
pip install manim
48+
pip install -ve .[doc,flows] --upgrade
49+
git clone --recursive https://github.com/xinetzone/maple-font.git
50+
cd maple-font
51+
pip install -ve .
52+
maple-font build --full
53+
conda install -c conda-forge pandoc compilers podman
54+
- name: 🔧 Build HTML
55+
run: |
5856
invoke doc
5957
- name: Setup Pages
6058
uses: actions/configure-pages@main

0 commit comments

Comments
 (0)