From ca9c13299bf558297e81ba8be418c9221a35a1e2 Mon Sep 17 00:00:00 2001 From: EltonGohJH Date: Wed, 1 May 2024 12:04:40 +0800 Subject: [PATCH] Specify CACHE_DIR when deploying with GH actions --- packages/core/src/Site/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/Site/index.ts b/packages/core/src/Site/index.ts index 6f2ff4f220..0918e75fb5 100644 --- a/packages/core/src/Site/index.ts +++ b/packages/core/src/Site/index.ts @@ -1405,6 +1405,8 @@ export class Site { email: 'deploy@appveyor.com', }; } else if (process.env.GITHUB_ACTIONS) { + // Set cache folder to a location Github Actions can find. + process.env.CACHE_DIR = path.join(process.env.GITHUB_WORKSPACE || '', 'gh-pages', '.cache'); repoSlug = Site.extractRepoSlug(options.repo, process.env.GITHUB_REPOSITORY); options.user = {