[ci] use hy utils script

This commit is contained in:
SouthFox 2025-01-09 16:05:19 +08:00
parent e67942d8c3
commit 5a7fe1467f
2 changed files with 12 additions and 18 deletions

View file

@ -13,23 +13,22 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.9 - name: Set up Python 3.13
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: 3.13
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get install wget sudo apt-get install wget
python -m pip install --upgrade pip python -m pip install fonttools brotli requests hy
python -m pip install fonttools brotli requests
git config --global user.name "SouthFox-D" git config --global user.name "SouthFox-D"
git config --global user.email "southfoxdreamer@gmail.com" git config --global user.email "southfoxdreamer@gmail.com"
- name: Check Img - name: Check Img
run: | run: |
wget https://raw.githubusercontent.com/SouthFox-D/blog_img/main/imgList.json wget https://raw.githubusercontent.com/SouthFox-D/blog_img/main/imgList.json
python3 utils.py -b hy utils.hy -b
- name: Backup - name: Backup
env: env:

View file

@ -13,20 +13,15 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.9 - name: Set up Python 3.13
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: 3.13
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 17
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip sudo apt-get install wget
python -m pip install fonttools brotli requests python -m pip install fonttools brotli requests hy
npm install -g hexo-cli npm install -g hexo-cli
npm install npm install
git config --global user.name "SouthFox-D" git config --global user.name "SouthFox-D"
@ -39,7 +34,7 @@ jobs:
run: | run: |
hexo clean hexo clean
hexo generate hexo generate
python3 utils.py -d hy utils.hy -d
pyftsubset Zpix.ttf --text-file=strdb.txt pyftsubset Zpix.ttf --text-file=strdb.txt
fonttools ttLib.woff2 compress -o Zpix.woff2 Zpix.subset.ttf fonttools ttLib.woff2 compress -o Zpix.woff2 Zpix.subset.ttf
mv Zpix.woff2 ./public/css/fonts mv Zpix.woff2 ./public/css/fonts