forked from Moemu/FortuneUpUp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
51 deletions.
There are no files selected for viewing
102 changes: 51 additions & 51 deletions
102
.github/workflows/FontCompress.yml → .github/workflows/FontCompress.yml.backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
name: Font Subsetting and Compression | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'FortuneUpUp.js' | ||
- '.github/**' | ||
|
||
jobs: | ||
FontCompress: | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'web-flow[bot]' | ||
steps: | ||
- name: 检查代码/Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: 安装SSH工具/Install SSH | ||
run: sudo apt-get update && sudo apt-get install -y openssh-client | ||
- name: 配置SSH秘钥/Set up SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: 初始化Python环境/Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: 安装字体工具/Install FontTools | ||
run: | | ||
pip install fonttools | ||
pip install Brotli | ||
- name: 下载字体/Download Font | ||
if: github.ref == 'refs/heads/main' | ||
run: curl -L -o XiaolaiSC-Regular.ttf https://file.muspace.top/font/XiaolaiSC-Regular.ttf | ||
- name: 压缩字体/Compress Fonts | ||
if: github.ref == 'refs/heads/main' | ||
run: python font/Compress.py | ||
- name: 清理文件/Clean Up | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
rm -rf XiaolaiSC-Regular.ttf | ||
rm -rf text_set.txt | ||
- name: 推送到仓库/Git push | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "[Font Compress] ${{ github.event.head_commit.message }}" | ||
name: Font Subsetting and Compression | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'FortuneUpUp.js' | ||
- '.github/**' | ||
|
||
jobs: | ||
FontCompress: | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'web-flow[bot]' | ||
steps: | ||
- name: 检查代码/Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: 安装SSH工具/Install SSH | ||
run: sudo apt-get update && sudo apt-get install -y openssh-client | ||
- name: 配置SSH秘钥/Set up SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: 初始化Python环境/Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: 安装字体工具/Install FontTools | ||
run: | | ||
pip install fonttools | ||
pip install Brotli | ||
- name: 下载字体/Download Font | ||
if: github.ref == 'refs/heads/main' | ||
run: curl -L -o XiaolaiSC-Regular.ttf https://file.muspace.top/font/XiaolaiSC-Regular.ttf | ||
- name: 压缩字体/Compress Fonts | ||
if: github.ref == 'refs/heads/main' | ||
run: python font/Compress.py | ||
- name: 清理文件/Clean Up | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
rm -rf XiaolaiSC-Regular.ttf | ||
rm -rf text_set.txt | ||
- name: 推送到仓库/Git push | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "[Font Compress] ${{ github.event.head_commit.message }}" | ||
git push [email protected]:KJZH001/FortuneUpUp.git origin/main |