在 Action 中添加图片自动上传流程 #12

Merged
szhhwh merged 6 commits from dev/auto-upload-images into main 2025-05-11 16:42:47 +08:00
Showing only changes of commit 875974e2f1 - Show all commits

View File

@ -50,25 +50,25 @@ jobs:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: 🔧Install pnpm
name: 🔧 Install pnpm
with:
version: 10
run_install: false
- name: 🔧Install Node.js
- name: 🔧 Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: 🔧Install dependencies
- name: 🔧 Install dependencies
run: pnpm install
- name: 📥 Download mdluploader
run: wget http://img-kodo.lionhao.top/rust_release/mdluploader.tar.gz -O /tmp/mdluploader.tar.gz
- name: 📂 Extract mdluploader
run: tar -xzf /tmp/mdluploader.tar.gz -C /tmp
- name: 🔧 Install mdluploader
run: wget http://img-kodo.lionhao.top/rust_release/mdluploader.tar.gz -O /tmp/mdluploader.tar.gz \
&& tar -xzf /tmp/mdluploader.tar.gz -C /tmp \
&& chmod +x /tmp/mdluploader \
&& echo "Installed mdluploader successfully"
- name: 📤 Upload images to S3
run: |
@ -80,8 +80,10 @@ jobs:
--endpoint ${{ secrets.S3_ENDPOINT }} \
--remote-root ${{ secrets.S3_REMOTE_ROOT }} \
--domain ${{ secrets.S3_DOMAIN }} \
env:
RUST_LOG: info
- name: 🔴Build doc
- name: 🔴 Build doc
run: pnpm run docs:build
- name: 🚀 Deploy to Cloudflare Pages