From 0b032b23e6e29cbf4d54680c12dc4eeb58f4dd8d 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 884286f..4791c1b 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 6b9cbe2..a11df79 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 5fae715..1be54c3 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 40fe3d13fec16d6409b3af43f9f5a299e612bf25 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 1be54c3..5fae715 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", },