Compare commits

...

5 Commits

Author SHA1 Message Date
github-actions[bot] 15c9a9b10c Automatically optimize assets 2024-12-21 15:49:44 +00:00
lirtual 0f9e351e34 fix: 修复FFmpeg缓存问题 2024-12-21 23:22:34 +08:00
lirtual 06b77fb7ad fix: 修复FFmpeg缓存问题 2024-12-21 23:03:54 +08:00
lirtual 5ba5a02c76 fix: 修复FFmpeg缓存问题 2024-12-21 22:32:35 +08:00
lirtual be4209ab14 feat: 添加JSON优化脚本 2024-12-21 21:58:50 +08:00
24689 changed files with 12538 additions and 14361857 deletions

View File

@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 获取完整历史以便进行比较
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
@ -18,19 +18,26 @@ jobs:
node-version: '18'
cache: 'npm'
# 添加 FFmpeg 缓存
# 优化 FFmpeg 缓存
- name: Cache FFmpeg
id: cache-ffmpeg
uses: actions/cache@v3
with:
path: /usr/bin/ffmpeg
key: ${{ runner.os }}-ffmpeg
path: ~/ffmpeg
key: ${{ runner.os }}-ffmpeg-static-6.1
- name: Install FFmpeg
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
mkdir -p ~/ffmpeg
wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xf ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-*-amd64-static/ffmpeg ~/ffmpeg/
mv ffmpeg-*-amd64-static/ffprobe ~/ffmpeg/
rm -rf ffmpeg-*-amd64-static*
- name: Add FFmpeg to PATH
run: echo "$HOME/ffmpeg" >> $GITHUB_PATH
# 添加 node_modules 缓存
- name: Cache node_modules
@ -45,13 +52,16 @@ jobs:
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
npm install sharp
npm install sharp glob
- name: Optimize Images
run: node scripts/optimize-images.js
- name: Optimize Audio
run: node scripts/optimize-audio.js
- name: Optimize JSON
run: node scripts/optimize-json.js
- name: Check for changes
id: check_changes
@ -69,4 +79,4 @@ jobs:
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "Automatically optimize assets"
git push
git push

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More