Skip to content

Commit

Permalink
Specify CACHE_DIR when deploying with GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
EltonGohJH committed May 1, 2024
1 parent 2d21519 commit ca9c132
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/Site/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ export class Site {
email: '[email protected]',
};
} 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 = {
Expand Down

0 comments on commit ca9c132

Please sign in to comment.