Compare commits
5 Commits
f1343eda9d
...
15c9a9b10c
Author | SHA1 | Date |
---|---|---|
github-actions[bot] | 15c9a9b10c | |
lirtual | 0f9e351e34 | |
lirtual | 06b77fb7ad | |
lirtual | 5ba5a02c76 | |
lirtual | be4209ab14 |
|
@ -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.
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.
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.
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
Loading…
Reference in New Issue