398e6e61cb
This reverts commit 7e357ce.
原判断有误:以为 ubuntu-latest 无对应 runner。管理后台确认 gitea 有一个
**全局**在线 runner `nas-runner`(id 2, label ubuntu-latest),它服务所有仓库
(含 pangolin)——web 发版本来就有 runner、并未卡住。恢复 runs-on: ubuntu-latest,
用回这个专供 web/node 的全局 runner,而非把 web 挪到 Mac host runner。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
name: Deploy Site
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'site-v[0-9]*.[0-9]*.[0-9]*'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: deploy-site
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy-site:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# runner 镜像 catthehacker/ubuntu:act-latest 自带 node/npx,直接跑;
|
|
# 不用嵌套 docker run(job 容器内的 $PWD 在宿主上不存在,DinD 挂载会失败)。
|
|
- name: Compile (Astro 官网)
|
|
env:
|
|
SITE_URL: https://pangolin.yanmeiai.com
|
|
run: bash scripts/ci/compile-site.sh
|
|
|
|
# 用户中心(web/usercenter,basePath=/user,http 模式)构建 → out/。
|
|
- name: Compile (用户中心 Next.js)
|
|
run: bash scripts/ci/compile-usercenter.sh
|
|
|
|
# 合并:用户中心并入官网 dist/user/ + _headers 按 /user/* 分域(见脚本)。
|
|
# 域名迁移:原独立子域 app.yanmeiai.com → 主站子路径 pangolin.yanmeiai.com/user/。
|
|
- name: Combine (官网 + 用户中心)
|
|
run: bash scripts/ci/combine-site.sh
|
|
|
|
# 单次部署合并产物到 pangolin-site:/ 官网、/user/ 用户中心。
|
|
- name: Deploy → Cloudflare Pages
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
run: bash scripts/ci/deploy-site.sh
|