From a2a0697cabcd4e3d0f4098ddc3548b46a9630fc8 Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 16 Sep 2026 16:12:50 +0800 Subject: [PATCH 1/2] ci: configure remote build caching --- .github/workflows/ci.yml | 2 ++ .github/workflows/deploy.yml | 6 ++++++ apps/dashboard/package.json | 1 - apps/dashboard/vite.config.ts | 8 ++++++++ vite.config.ts | 5 +++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 344adf6..e4c94fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ permissions: {} jobs: ci: timeout-minutes: 15 + env: + VP_REMOTE_CACHE: read strategy: fail-fast: false diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 929b4da..25173b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,12 @@ concurrency: jobs: build: runs-on: ubuntu-latest + env: + VP_REMOTE_CACHE: >- + ${{ github.event_name == 'push' && + github.ref == 'refs/heads/main' && + github.repository == 'voidzero-dev/vibe-dashboard' && + 'read-write' || 'read' }} permissions: contents: read pages: write diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index c7583c6..762a3c8 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -5,7 +5,6 @@ "type": "module", "scripts": { "dev": "vp dev", - "build": "vp build", "preview": "vp preview", "clean": "rm -rf dist", "test": "vp test" diff --git a/apps/dashboard/vite.config.ts b/apps/dashboard/vite.config.ts index 2015d50..9ea6491 100644 --- a/apps/dashboard/vite.config.ts +++ b/apps/dashboard/vite.config.ts @@ -4,6 +4,14 @@ import { defineConfig } from "vite-plus"; // https://vite.dev/config/ export default defineConfig({ + run: { + tasks: { + build: { + command: "vp build", + cache: true, + }, + }, + }, plugins: [tailwindcss()], base: "/vibe-dashboard/", build: { diff --git a/vite.config.ts b/vite.config.ts index e33031e..2aa13ad 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,11 @@ import { defineConfig } from "vite-plus"; export default defineConfig({ + run: { + remoteCache: { + url: "https://vibe-dashboard-cache.remote-cache-demo.workers.dev/projects/vibe-dashboard", + }, + }, staged: { "*": "vp check --fix", }, From 1fd24ea9d98bf0205cbcaef2f66e27139eeff558 Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 16 Sep 2026 16:15:49 +0800 Subject: [PATCH 2/2] ci: enable task caching globally --- apps/dashboard/package.json | 1 + apps/dashboard/vite.config.ts | 8 -------- vite.config.ts | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 762a3c8..c7583c6 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "vp dev", + "build": "vp build", "preview": "vp preview", "clean": "rm -rf dist", "test": "vp test" diff --git a/apps/dashboard/vite.config.ts b/apps/dashboard/vite.config.ts index 9ea6491..2015d50 100644 --- a/apps/dashboard/vite.config.ts +++ b/apps/dashboard/vite.config.ts @@ -4,14 +4,6 @@ import { defineConfig } from "vite-plus"; // https://vite.dev/config/ export default defineConfig({ - run: { - tasks: { - build: { - command: "vp build", - cache: true, - }, - }, - }, plugins: [tailwindcss()], base: "/vibe-dashboard/", build: { diff --git a/vite.config.ts b/vite.config.ts index 2aa13ad..59cc696 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "vite-plus"; export default defineConfig({ run: { + cache: true, remoteCache: { url: "https://vibe-dashboard-cache.remote-cache-demo.workers.dev/projects/vibe-dashboard", },