From 4c3681fb75bd05c80e1a9248816360a498b5dd71 Mon Sep 17 00:00:00 2001 From: tiye Date: Mon, 5 Oct 2026 06:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20COS=20=E5=86=85=E7=BD=AE?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=B9=B6=E9=9A=94=E7=A6=BB=20Tabletwo=20CDN?= =?UTF-8?q?=20=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/upload.yaml | 14 +++++++++++--- README.md | 10 +++++++++- dist-server/package.json | 28 ---------------------------- 3 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 dist-server/package.json diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index f6e472c..f017c3b 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -9,9 +9,15 @@ on: permissions: contents: read +concurrency: + group: upload-${{ github.repository }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} + queue: max + cancel-in-progress: false + jobs: test: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - name: Check out repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 @@ -33,7 +39,7 @@ jobs: - name: Set up Calcit and Caps uses: calcit-lang/setup-calcit@ca701be5a471759e442aa053cd100720bbe1f09f # v1.5.0 with: - version: "0.27.0" + deps-file: deps.cirru tools: calcit,caps caps-version: "0.1.1" @@ -58,9 +64,10 @@ jobs: id: asset-path env: CDN_ORIGIN: https://cos-sh.tiye.me + PR_NUMBER: ${{ github.event.pull_request.number }} run: | if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then - asset_prefix="${GITHUB_REPOSITORY}/pr/" + asset_prefix="${GITHUB_REPOSITORY}/pr/${PR_NUMBER}/${GITHUB_RUN_ID}/${GITHUB_RUN_ATTEMPT}/" else asset_prefix="${GITHUB_REPOSITORY}/" fi @@ -101,7 +108,8 @@ jobs: - name: Upload and verify frontend assets on COS if: steps.cos-credentials.outputs.available == 'true' - uses: worktools/cos-upload-action@17e6d213fe9f6772a6090a13c8ba044cd6cbcb09 # v1.1.1 + uses: worktools/cos-upload-action@v1.2.0 + timeout-minutes: 10 with: source-dir: dist bucket: ${{ secrets.COS_BUCKET }} diff --git a/README.md b/README.md index e508bc3..b4f1064 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,15 @@ http://repo.topix.im/tabletwo/ The existing web entry and the separate `/servers/tabletwo/` rsync deployment remain in place. COS migration applies only to the frontend `dist/` assets: GitHub Actions builds them against `https://cos-sh.tiye.me/TopixIM/tabletwo/` -(`.../pr/` on pull requests), uploads them, and verifies their public URLs. +(`.../pr////` on pull requests), uploads them, and verifies their public URLs. + +前端使用 COS Action v1.2.0 的 `public-base-url` 内置校验,不添加重复验证脚本。 +PR 资源隔离到独立运行目录,上传按事件及分支排队;job/上传分别限制为 15/10 分钟。 +保留现有 Yarn 4.12.0 锁文件;Calcit 从 deps.cirru 读取版本,现有 client/server 门禁保留。 +本轮保留 Calcit/procs 0.27.0,不代表已完成 0.28 类型迁移。生产 CDN 前缀与 +`/servers/tabletwo/` 服务端部署路径不变。 +移除误跟踪的过时 `dist-server/package.json`;它仍由原构建步骤从根 manifest 生成, +不会改变服务端打包或部署内容。`dist-server/` 原本已被 gitignore 忽略。 > We need a table for two people. They sit in front of each other, seeing into the eyes, and to compose the same markdown file togather. diff --git a/dist-server/package.json b/dist-server/package.json deleted file mode 100644 index f46b63d..0000000 --- a/dist-server/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "tabletwo", - "version": "0.1.0", - "description": "A markdown table ot two", - "main": "index.js", - "scripts": { - "compile-page": "cr --emit-js --once", - "release-page": "vite build --base=./", - "watch-page": "cr --emit-js/" - }, - "repository": { - "type": "git", - "url": "git@github.com:TopixIM/tabletwo.git" - }, - "author": "jiyinyiyong", - "license": "MIT", - "devDependencies": { - "bottom-tip": "^0.1.3", - "feather-icons": "^4.28.0", - "highlight.js": "^11.5.0", - "url-parse": "^1.5.10", - "vite": "^2.8.6" - }, - "dependencies": { - "@calcit/procs": "^0.5.25", - "escape-html": "^1.0.3" - } -}