fix: 修復 release workflow job 依賴 + prettier 格式修正
This commit is contained in:
parent
1eaf5e4c2c
commit
a62a531668
2 changed files with 150 additions and 62 deletions
171
.github/workflows/release.yml
vendored
171
.github/workflows/release.yml
vendored
|
|
@ -22,40 +22,75 @@ jobs:
|
||||||
# 🐳 Build AMD64 Image(分開構建解決空間不足問題)
|
# 🐳 Build AMD64 Image(分開構建解決空間不足問題)
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
build-amd64:
|
build-amd64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# ========================================
|
||||||
|
# 🔥 第一步就清理磁碟(在 checkout 之前!)
|
||||||
|
# ========================================
|
||||||
|
- name: Maximize disk space (before checkout)
|
||||||
|
run: |
|
||||||
|
echo "🧹 極限磁碟清理(在 checkout 之前)..."
|
||||||
|
echo "========================================"
|
||||||
|
echo "📊 初始磁碟空間:"
|
||||||
|
df -h /
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
|
# 停止不需要的服務
|
||||||
|
sudo systemctl stop docker || true
|
||||||
|
|
||||||
|
# 移除大型預裝軟體(最關鍵!)
|
||||||
|
sudo rm -rf /usr/share/dotnet || true # ~6GB
|
||||||
|
sudo rm -rf /usr/local/lib/android || true # ~10GB
|
||||||
|
sudo rm -rf /opt/ghc || true # ~2GB
|
||||||
|
sudo rm -rf /opt/hostedtoolcache || true # ~8GB
|
||||||
|
sudo rm -rf /usr/share/swift || true # ~1.5GB
|
||||||
|
sudo rm -rf /usr/local/share/boost || true # ~500MB
|
||||||
|
sudo rm -rf /opt/microsoft || true # ~1GB
|
||||||
|
sudo rm -rf /usr/local/aws-* || true
|
||||||
|
sudo rm -rf /usr/local/julia* || true
|
||||||
|
sudo rm -rf /usr/share/az_* /opt/az || true
|
||||||
|
sudo rm -rf /usr/lib/google-cloud-sdk || true
|
||||||
|
sudo rm -rf /usr/local/share/powershell || true
|
||||||
|
sudo rm -rf /usr/share/miniconda || true
|
||||||
|
sudo rm -rf /usr/local/go ~/go || true
|
||||||
|
sudo rm -rf /usr/share/rust ~/.rustup ~/.cargo || true
|
||||||
|
sudo rm -rf /usr/share/R /usr/lib/R || true
|
||||||
|
|
||||||
|
# 移除預裝資料庫
|
||||||
|
sudo rm -rf /var/lib/mysql || true
|
||||||
|
sudo rm -rf /var/lib/postgresql || true
|
||||||
|
sudo rm -rf /var/lib/mongodb || true
|
||||||
|
|
||||||
|
# 移除文檔
|
||||||
|
sudo rm -rf /usr/share/doc || true
|
||||||
|
sudo rm -rf /usr/share/man || true
|
||||||
|
sudo rm -rf /usr/share/locale || true
|
||||||
|
sudo rm -rf /usr/share/icons || true
|
||||||
|
|
||||||
|
# 清理 APT
|
||||||
|
sudo apt-get clean || true
|
||||||
|
sudo rm -rf /var/lib/apt/lists/* || true
|
||||||
|
sudo rm -rf /var/cache/apt/archives || true
|
||||||
|
|
||||||
|
# 清理 Docker(完全重置)
|
||||||
|
sudo rm -rf /var/lib/docker || true
|
||||||
|
sudo mkdir -p /var/lib/docker
|
||||||
|
|
||||||
|
# 重啟 Docker
|
||||||
|
sudo systemctl start docker || true
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "📊 清理後磁碟空間:"
|
||||||
|
df -h /
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# ========================================
|
|
||||||
# 🔥 極限磁碟清理(釋放 50-60GB 空間)
|
|
||||||
# ========================================
|
|
||||||
- name: Free disk space (maximum)
|
|
||||||
uses: jlumbroso/free-disk-space@main
|
|
||||||
with:
|
|
||||||
tool-cache: true
|
|
||||||
android: true
|
|
||||||
dotnet: true
|
|
||||||
haskell: true
|
|
||||||
large-packages: true
|
|
||||||
docker-images: true
|
|
||||||
swap-storage: true
|
|
||||||
|
|
||||||
- name: Additional disk cleanup
|
|
||||||
run: |
|
|
||||||
echo "🧹 額外磁碟清理..."
|
|
||||||
df -h /
|
|
||||||
sudo rm -rf /usr/share/swift /var/lib/mysql /var/lib/postgresql || true
|
|
||||||
sudo rm -rf /usr/share/doc /usr/share/man /usr/share/locale || true
|
|
||||||
sudo rm -rf /usr/local/go ~/go /usr/local/julia* || true
|
|
||||||
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* || true
|
|
||||||
docker system prune -af --volumes || true
|
|
||||||
df -h /
|
|
||||||
|
|
||||||
- name: Get tag name
|
- name: Get tag name
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -93,37 +128,75 @@ jobs:
|
||||||
# 🐳 Build ARM64 Image(分開構建解決空間不足問題)
|
# 🐳 Build ARM64 Image(分開構建解決空間不足問題)
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
build-arm64:
|
build-arm64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# ========================================
|
||||||
|
# 🔥 第一步就清理磁碟(在 checkout 之前!)
|
||||||
|
# ========================================
|
||||||
|
- name: Maximize disk space (before checkout)
|
||||||
|
run: |
|
||||||
|
echo "🧹 極限磁碟清理(在 checkout 之前)..."
|
||||||
|
echo "========================================"
|
||||||
|
echo "📊 初始磁碟空間:"
|
||||||
|
df -h /
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
|
# 停止不需要的服務
|
||||||
|
sudo systemctl stop docker || true
|
||||||
|
|
||||||
|
# 移除大型預裝軟體(最關鍵!)
|
||||||
|
sudo rm -rf /usr/share/dotnet || true # ~6GB
|
||||||
|
sudo rm -rf /usr/local/lib/android || true # ~10GB
|
||||||
|
sudo rm -rf /opt/ghc || true # ~2GB
|
||||||
|
sudo rm -rf /opt/hostedtoolcache || true # ~8GB
|
||||||
|
sudo rm -rf /usr/share/swift || true # ~1.5GB
|
||||||
|
sudo rm -rf /usr/local/share/boost || true # ~500MB
|
||||||
|
sudo rm -rf /opt/microsoft || true # ~1GB
|
||||||
|
sudo rm -rf /usr/local/aws-* || true
|
||||||
|
sudo rm -rf /usr/local/julia* || true
|
||||||
|
sudo rm -rf /usr/share/az_* /opt/az || true
|
||||||
|
sudo rm -rf /usr/lib/google-cloud-sdk || true
|
||||||
|
sudo rm -rf /usr/local/share/powershell || true
|
||||||
|
sudo rm -rf /usr/share/miniconda || true
|
||||||
|
sudo rm -rf /usr/local/go ~/go || true
|
||||||
|
sudo rm -rf /usr/share/rust ~/.rustup ~/.cargo || true
|
||||||
|
sudo rm -rf /usr/share/R /usr/lib/R || true
|
||||||
|
|
||||||
|
# 移除預裝資料庫
|
||||||
|
sudo rm -rf /var/lib/mysql || true
|
||||||
|
sudo rm -rf /var/lib/postgresql || true
|
||||||
|
sudo rm -rf /var/lib/mongodb || true
|
||||||
|
|
||||||
|
# 移除文檔
|
||||||
|
sudo rm -rf /usr/share/doc || true
|
||||||
|
sudo rm -rf /usr/share/man || true
|
||||||
|
sudo rm -rf /usr/share/locale || true
|
||||||
|
sudo rm -rf /usr/share/icons || true
|
||||||
|
|
||||||
|
# 清理 APT
|
||||||
|
sudo apt-get clean || true
|
||||||
|
sudo rm -rf /var/lib/apt/lists/* || true
|
||||||
|
sudo rm -rf /var/cache/apt/archives || true
|
||||||
|
|
||||||
|
# 清理 Docker(完全重置)
|
||||||
|
sudo rm -rf /var/lib/docker || true
|
||||||
|
sudo mkdir -p /var/lib/docker
|
||||||
|
|
||||||
|
# 重啟 Docker
|
||||||
|
sudo systemctl start docker || true
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "📊 清理後磁碟空間:"
|
||||||
|
df -h /
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Free disk space (maximum)
|
|
||||||
uses: jlumbroso/free-disk-space@main
|
|
||||||
with:
|
|
||||||
tool-cache: true
|
|
||||||
android: true
|
|
||||||
dotnet: true
|
|
||||||
haskell: true
|
|
||||||
large-packages: true
|
|
||||||
docker-images: true
|
|
||||||
swap-storage: true
|
|
||||||
|
|
||||||
- name: Additional disk cleanup
|
|
||||||
run: |
|
|
||||||
echo "🧹 額外磁碟清理..."
|
|
||||||
df -h /
|
|
||||||
sudo rm -rf /usr/share/swift /var/lib/mysql /var/lib/postgresql || true
|
|
||||||
sudo rm -rf /usr/share/doc /usr/share/man /usr/share/locale || true
|
|
||||||
sudo rm -rf /usr/local/go ~/go /usr/local/julia* || true
|
|
||||||
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* || true
|
|
||||||
docker system prune -af --volumes || true
|
|
||||||
df -h /
|
|
||||||
|
|
||||||
- name: Get tag name
|
- name: Get tag name
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,23 @@ export const BaseHtml = ({
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
{/* SEO 核心設定 - 允許搜尋引擎索引 */}
|
{/* SEO 核心設定 - 允許搜尋引擎索引 */}
|
||||||
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
|
<meta
|
||||||
|
name="robots"
|
||||||
|
content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"
|
||||||
|
/>
|
||||||
<meta name="googlebot" content="index, follow" />
|
<meta name="googlebot" content="index, follow" />
|
||||||
<meta name="bingbot" content="index, follow" />
|
<meta name="bingbot" content="index, follow" />
|
||||||
<meta http-equiv="content-language" content="zh-CN" />
|
<meta http-equiv="content-language" content="zh-CN" />
|
||||||
|
|
||||||
{/* Canonical URL */}
|
{/* Canonical URL */}
|
||||||
<link rel="canonical" href="https://convertx-cn.bioailab.qzz.io/" />
|
<link rel="canonical" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||||
|
|
||||||
{/* 多語言替代連結 */}
|
{/* 多語言替代連結 */}
|
||||||
<link rel="alternate" hreflang="zh-CN" href="https://convertx-cn.bioailab.qzz.io/" />
|
<link rel="alternate" hreflang="zh-CN" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||||
<link rel="alternate" hreflang="x-default" href="https://convertx-cn.bioailab.qzz.io/" />
|
<link rel="alternate" hreflang="x-default" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||||
|
|
||||||
{/* 應用程式資訊 */}
|
{/* 應用程式資訊 */}
|
||||||
<meta name="webroot" content={webroot} />
|
<meta name="webroot" content={webroot} />
|
||||||
<meta name="locale" content={locale} />
|
<meta name="locale" content={locale} />
|
||||||
|
|
@ -37,25 +40,37 @@ export const BaseHtml = ({
|
||||||
<meta name="apple-mobile-web-app-title" content="ConvertX-CN" />
|
<meta name="apple-mobile-web-app-title" content="ConvertX-CN" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
|
||||||
{/* SEO 描述與關鍵字 */}
|
{/* SEO 描述與關鍵字 */}
|
||||||
<meta name="description" content="ConvertX-CN 是免費的線上檔案轉換工具,支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉。無需安裝軟體,自架部署保護隱私。" />
|
<meta
|
||||||
<meta name="keywords" content="檔案轉換,PDF轉換,Word轉PDF,圖片轉換,格式轉換,線上轉換,免費工具,ConvertX" />
|
name="description"
|
||||||
|
content="ConvertX-CN 是免費的線上檔案轉換工具,支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉。無需安裝軟體,自架部署保護隱私。"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="keywords"
|
||||||
|
content="檔案轉換,PDF轉換,Word轉PDF,圖片轉換,格式轉換,線上轉換,免費工具,ConvertX"
|
||||||
|
/>
|
||||||
<meta name="author" content="ConvertX-CN" />
|
<meta name="author" content="ConvertX-CN" />
|
||||||
|
|
||||||
{/* Open Graph / 社交媒體分享 */}
|
{/* Open Graph / 社交媒體分享 */}
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="https://convertx-cn.bioailab.qzz.io/" />
|
<meta property="og:url" content="https://convertx-cn.bioailab.qzz.io/" />
|
||||||
<meta property="og:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
<meta property="og:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
||||||
<meta property="og:description" content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉,自架部署保護隱私。" />
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉,自架部署保護隱私。"
|
||||||
|
/>
|
||||||
<meta property="og:locale" content="zh_CN" />
|
<meta property="og:locale" content="zh_CN" />
|
||||||
<meta property="og:site_name" content="ConvertX-CN" />
|
<meta property="og:site_name" content="ConvertX-CN" />
|
||||||
|
|
||||||
{/* Twitter Card */}
|
{/* Twitter Card */}
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
<meta name="twitter:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
||||||
<meta name="twitter:description" content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉" />
|
<meta
|
||||||
|
name="twitter:description"
|
||||||
|
content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉"
|
||||||
|
/>
|
||||||
|
|
||||||
<meta name="theme-color" content="#a5d601" />
|
<meta name="theme-color" content="#a5d601" />
|
||||||
<title safe>{title}</title>
|
<title safe>{title}</title>
|
||||||
<link rel="stylesheet" href={`${webroot}/generated.css`} />
|
<link rel="stylesheet" href={`${webroot}/generated.css`} />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue