10834ef9bb
對應 leo 2026-05-16 Actions 配額用爆 → 全面瘦身 CI trigger。 deploy.yml (Workers): 既有:worker-level git diff filter(只 deploy 改到的 worker)✅ 新增:workflow-level paths-ignore — doc-only commit 完全不啟動 workflow 排除:**.md / AGENTS.md / .agents/** / docs/** / registry/examples/** / registry/skills/** / .gitignore / LICENSE 之前每個 doc push 都觸發 discover job 吃 ~1 min。 本輪 LI 開發 ~10 doc-only commit = 省 ~10 min deploy-landing.yml (Pages): 既有:paths filter ('landing/**') ✅ 新增:concurrency cancel-in-progress (原 false → true) landing build ~3 min 是大頭,連續 push 取消舊 build 省最多
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
name: Deploy Landing
|
||
|
||
# 自動部署 landing/ (Next.js on Cloudflare Pages)
|
||
# 觸發:push 到 main 且 landing/ 有變動,或手動
|
||
# 為何獨立檔:landing 是 Pages 不是 Worker,跟 deploy.yml (掃 wrangler.toml) 邏輯不同
|
||
# Secret 需要:CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID(既有)
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
paths:
|
||
- 'landing/**'
|
||
- '.github/workflows/deploy-landing.yml'
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: deploy-landing-${{ github.ref }}
|
||
# 連續 push landing 改動時,舊 build 自動 cancel(landing build ~3 min 是大頭,省 minutes 關鍵)
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
deploy:
|
||
name: Build + Deploy to CF Pages
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: read
|
||
deployments: write
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- uses: pnpm/action-setup@v4
|
||
with:
|
||
version: 10
|
||
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: 22
|
||
|
||
- name: Install
|
||
working-directory: landing
|
||
run: pnpm install --no-frozen-lockfile
|
||
|
||
- name: Build (Next.js)
|
||
working-directory: landing
|
||
run: pnpm next build
|
||
|
||
- name: Build for Pages
|
||
working-directory: landing
|
||
run: pnpm exec next-on-pages
|
||
|
||
- name: Deploy to Cloudflare Pages
|
||
uses: cloudflare/wrangler-action@v3
|
||
with:
|
||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||
command: pages deploy landing/.vercel/output/static --project-name arcrun-landing --branch main --commit-message "ci ${{ github.sha }}"
|