From 17d0df73b6bfc634f13c035cbaa95fd3088d6197 Mon Sep 17 00:00:00 2001 From: wan9chi Date: Sun, 27 Sep 2026 19:59:46 +0800 Subject: [PATCH] ci(docs): unpin vp and move docs task cache settings under cache --- .github/actions/deploy-docs/action.yml | 4 --- .github/workflows/build-docs-fork-preview.yml | 2 -- docs/vite.config.ts | 26 +++++++++---------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/actions/deploy-docs/action.yml b/.github/actions/deploy-docs/action.yml index 90f13b5111..2a2839a6da 100644 --- a/.github/actions/deploy-docs/action.yml +++ b/.github/actions/deploy-docs/action.yml @@ -34,12 +34,8 @@ inputs: runs: using: 'composite' steps: - # docs/vite.config.ts uses the task cache format of this release. Once a - # release requires task cache settings under `cache`, remove this pin and - # the one in build-docs-fork-preview.yml, and update docs/vite.config.ts. - uses: voidzero-dev/setup-vp@3754dd7dbdb32bd8f6d28b6043de13ad3a75f21f # v1.21.1 with: - version: 1.0.0-rc.0 cache: true working-directory: docs cache-dependency-path: docs/pnpm-lock.yaml diff --git a/.github/workflows/build-docs-fork-preview.yml b/.github/workflows/build-docs-fork-preview.yml index 7fced42207..d6314ec670 100644 --- a/.github/workflows/build-docs-fork-preview.yml +++ b/.github/workflows/build-docs-fork-preview.yml @@ -85,10 +85,8 @@ jobs: # Build the same commit that workflow_run.head_sha identifies. ref: ${{ github.event.pull_request.head.sha }} - # Keep in sync with the pin in .github/actions/deploy-docs/action.yml. - uses: voidzero-dev/setup-vp@3754dd7dbdb32bd8f6d28b6043de13ad3a75f21f # v1.21.1 with: - version: 1.0.0-rc.0 working-directory: docs cache: false diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 989119a081..934a3c2b89 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -1,21 +1,21 @@ export default { run: { tasks: { - // Docs builds pin `vp` in .github/actions/deploy-docs/action.yml. Keep the - // cache settings at the top level until that pin requires them under `cache`. 'build:site': { command: 'vitepress build', - // The docs and installer URLs depend on the explicit origin or Workers - // branch, so different deploy targets must not share cached output. - env: ['DOCS_SITE_ORIGIN', 'WORKERS_CI', 'WORKERS_CI_BRANCH'], - input: [ - { auto: true }, - '!.vitepress/.temp/**', - '!.vitepress/dist/**', - '!node_modules', - '!node_modules/.vite-temp/**', - ], - output: ['.vitepress/dist/**'], + cache: { + // The docs and installer URLs depend on the explicit origin or Workers + // branch, so different deploy targets must not share cached output. + env: ['DOCS_SITE_ORIGIN', 'WORKERS_CI', 'WORKERS_CI_BRANCH'], + input: [ + { auto: true }, + '!.vitepress/.temp/**', + '!.vitepress/dist/**', + '!node_modules', + '!node_modules/.vite-temp/**', + ], + output: ['.vitepress/dist/**'], + }, }, }, },