-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix gh-pages deployment cache "path" argument must be of type string undefined. #2562
Conversation
Thanks for attempting to fix this @gerteck |
Oh! yes, I think that is a very good point that I did not consider. Currently, I had simply set the cache directory as
Snippet from
It seems my PR can be greatly refined 😥 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank youf for your research on the cache problem! From my testing I think the PR succesfully mitigated the cache path not specified problem and also addressed the cache not cleaned up concern.
@Tim-Siu Each PR must have a SEMVER impact label, please remember to label the PR properly. |
What is the purpose of this pull request?
Fixes #2547
Overview of changes:
Fixes CACHE_DIR issue in
markbind deploy
In short, the cause of the CACHE_DIR bug is due to specific implementation used by dependency
gh-pages
involved in themarkbind deploy
workflow. To fix this, we manually set the cache dir in the deployment workflow.Anything you'd like to highlight/discuss:
Bug Faced:
markbind deploy
without apackage.json
file, or without setting env varCACHE_DIR
manually, user gets the"path" argument must of of type string
error, and deployment fails.Cause of Bug:
The bug is caused by the
find-cache-dir
dependency within the gh-pages module, used in the markbind deploy workflow.package.json
file in the current or parent directories. If no package.json is found, it returns undefined, causing the deployment to fail.Others:
Fix:
To work around this, let's manually set the cache directory used by
gh-pages
tonode_modules/.cache/gh-pages
, by setting theCACHE_DIR
environment variable in the deployment workflow. This follows the cache location detailed ingh-pages
changelog.Edit: Clarity.
Testing instructions:
markbind deploy
worksUnfortunately, unable to test on CI platforms.
Proposed commit message: (wrap lines at 72 characters)
Fix CACHE_DIR issue in markbind deploy
Manually sets cache directory used by
gh-pages
tonode_modules/.cache/gh-pages. This is needed as sub-dependency
find-cache-dir dependency in gh-pages assumes presence
of package.json file and a node_modules directory to deterrmine
cache, which do not exist in a MarkBind project.
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):