nizarmah / auto-minify

Minifies JS and CSS files in GitHub workflows.
GNU General Public License v3.0
48 stars 18 forks source link

Action Should Create Folder/Directory When It Doesn't Exist #8

Closed arimgibson closed 4 years ago

arimgibson commented 4 years ago

Loving this action, except I can't get it working exactly how I want it in my code. I plan on creating in a development folder, and having Auto Minify output to my production folder, which is then pushed to my gh-pages branch for Github Pages deployment.

When running, I get the following error. I may try and make a PR later, thought I would update here so you're aware.

Minify : /github/workspace/development/assets/plus.js -> /github/workspace/production/assets/plus.min.js
Error: ENOENT: no such file or directory, open '/github/workspace/production/assets/plus.min.js'

Thanks for this, really awesome idea!

arimgibson commented 4 years ago

Nevermind, that was totally my mistake. I didn't have a folder specifically called production/assets, when I made that folder the files were created properly. Might be worth looking into, but I should've caught that on my own earlier 😛

nizarmah commented 4 years ago

Hello :slightly_smiling_face: Sorry I couldn't reply any earlier to this issue! If I recall correctly, it should have created the folder on its own. I'm really glad that you love the action :smile: and thank you for using it, because without users, the action won't get any better :+1:

Oops, seems like I removed that line by mistake when I refactored the code :open_mouth: I found the line regarding the make directory if doesn't exist. I'm confused as to why this is not working :open_mouth:

nizarmah commented 4 years ago

Alright, so fixed it finally :tada:

Click here to go to the test branch where I tested it out. It finally works.

Make sure to update your action to v1.7

Thanks a lot for your issue by the way :slightly_smiling_face: And I'm glad that people are using the Action :D

Let me know if there's anything else you need, feel free to open a new issue :slightly_smiling_face: