Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the cache directory #362

Merged
merged 1 commit into from
Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const findCacheDir = require('find-cache-dir');
const Git = require('./git');
const filenamify = require('filenamify-url');
const copy = require('./util').copy;
Expand All @@ -10,7 +11,7 @@ const util = require('util');
const log = util.debuglog('gh-pages');

function getCacheDir() {
return path.relative(process.cwd(), path.resolve(__dirname, '../.cache'));
return findCacheDir({name: 'gh-pages'});
}

function getRepo(options) {
Expand Down
83 changes: 83 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"commander": "^2.18.0",
"email-addresses": "^3.0.1",
"filenamify-url": "^1.0.0",
"find-cache-dir": "^3.3.1",
"fs-extra": "^8.1.0",
"globby": "^6.1.0"
},
Expand Down
6 changes: 2 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,6 @@ Note that this plugin requires Git 1.9 or higher (because it uses the `--exit-co
name: 'ProcessError' }
```

When processing `gh-pages` module generate file in`.cache/` and if stuck some reason like wrong password
it will not automatically cleanup
The `gh-pages` module writes temporary files to a `node_modules/.cache/gh-pages` directory. The location of this directory can be customized by setting the `CACHE_DIR` environemnt variable.

Run `~node_modules/gh-pages/bin/gh-pages-clean`
or remove `~node_modules/gh-pages/.cache`
If `gh-pages` fails, you may find that you need to manually clean up the cache directory. To remove the cache directory, run `node_modules/gh-pages/bin/gh-pages-clean` or remove `node_modules/.cache/gh-pages`.