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

Specify CACHE_DIR when deploying with GH actions #2542

Merged
merged 1 commit into from
May 1, 2024

Conversation

EltonGohJH
Copy link
Contributor

@EltonGohJH EltonGohJH commented May 1, 2024

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:
Fixes #2538
Anything you'd like to highlight/discuss:
I have verified with my fork that setting cache directory will actually fix the bug.
So, the bug is actually due to not being able to locate .cache folder when running markbind deploy --ci with github actions.

Link to my fork where I set the env variable and it works
EltonGohJH/2024@c6d2191
Testing instructions:
I think we will need to release it to test it unfortunately.

Proposed commit message: (wrap lines at 72 characters)
Specify cache directory so GH Actions can locate gh-pages cache folder


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

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):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

@kaixin-hc
Copy link
Contributor

Yay!

Quick question... Is it possible for the user to set their cache directory for gh-pages to some other location? If they do this, does it become incompatible with MarkBind?

@EltonGohJH
Copy link
Contributor Author

EltonGohJH commented May 1, 2024

@kaixin-hc
The .cache location is only just for github action and users can control it for other form of deployment like markbind deploy without the ci flag.

Copy link
Contributor

@kaixin-hc kaixin-hc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@EltonGohJH EltonGohJH merged commit ccf7712 into MarkBind:master May 1, 2024
11 checks passed
@github-actions github-actions bot added the r.Patch Version resolver: increment by 0.0.1 label May 1, 2024
@damithc
Copy link
Contributor

damithc commented May 2, 2024

@EltonGohJH Thanks for the quick fix.
@kaixin-hc Does this fix the deploy issue? If so, we might need to do another release.

@damithc
Copy link
Contributor

damithc commented May 3, 2024

hmm... I'm still facing this when deploying. Perhaps it fixed the problem for GitHub Actions only?

$ markbind deploy -n
  __  __                  _      ____    _               _
 |  \/  |   __ _   _ __  | | __ | __ )  (_)  _ __     __| |
 | |\/| |  / _` | | '__| | |/ / |  _ \  | | | '_ \   / _` |
 | |  | | | (_| | | |    |   <  | |_) | | | | | | | | (_| |
 |_|  |_|  \__,_| |_|    |_|\_\ |____/  |_| |_| |_|  \__,_|

 v5.5.2
error: The "path" argument must be of type string. Received undefined


@damithc
Copy link
Contributor

damithc commented May 3, 2024

BTW, earlier I used to find (and delete) the .cache folder in /c/Users/damithch/AppData/Roaming/npm/node_modules/markbind-cli/node_modules/gh-pages/.cache but it doesn't appear there anymore.

@EltonGohJH
Copy link
Contributor Author

@damithc
I tried it on my end locally that is why I didnt not implement any fixes for locally.
I think if you try to set it manually in cli it should work.

set CACHE_DIR=<location of cache>

@damithc
Copy link
Contributor

damithc commented May 3, 2024

@damithc I tried it on my end locally that is why I didnt not implement any fixes for locally. I think if you try to set it manually in cli it should work.

set CACHE_DIR=<location of cache>

Thanks @EltonGohJH
set CACHE_DIR=cache worked.
So, do all users need to do this before deploying? Or is there way to avoid/fix the problem permanently?

@EltonGohJH
Copy link
Contributor Author

@damithc
I think we need to test more. It worked on my end. Maybe it does not work on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r.Patch Version resolver: increment by 0.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CS2103 website build fails due to missing bootstrap-icons.css
3 participants