Skip to content

Commit b821516

Browse files
committed
chore: update GitHub Actions workflows to install system dependencies and streamline dependency management using requirements.txt
1 parent 99445ce commit b821516

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ jobs:
2121
with:
2222
python-version: 3.x
2323

24+
- name: Install System Dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y libpango1.0-0 libharfbuzz0b libpangoft2-1.0-0 libffi-dev libjpeg-dev libopenjp2-7-dev
28+
2429
- name: Install dependencies
2530
run: |
26-
pip install mkdocs-material \
27-
mkdocs-minify-plugin \
28-
mkdocs-awesome-pages-plugin \
29-
mkdocs-mermaid2-plugin
31+
pip install -r requirements.txt
3032
3133
- name: Deploy to GitHub Pages
3234
run: |
@@ -49,7 +51,6 @@ jobs:
4951
done
5052
5153
# 4. 部署到 GitHub Pages
52-
pip install ghp-import
5354
ghp-import -n -p -f site
5455
env:
5556
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ jobs:
2929
3030
- name: Install dependencies
3131
run: |
32-
pip install mkdocs-material \
33-
mkdocs-minify-plugin \
34-
mkdocs-awesome-pages-plugin \
35-
mkdocs-mermaid2-plugin \
36-
mkdocs-with-pdf
32+
pip install -r requirements.txt
3733
npm install staticrypt
3834
3935
- name: Build Site

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ mkdocs-awesome-pages-plugin
44
mkdocs-mermaid2-plugin
55
mkdocs-with-pdf
66
staticrypt
7+
ghp-import

0 commit comments

Comments
 (0)