jeffreytse / jekyll-deploy-action

🪂 A Github Action to deploy the Jekyll site conveniently for GitHub Pages.
MIT License
329 stars 44 forks source link

How do I use pre_build_commands? #45

Closed oakjelly21 closed 2 years ago

oakjelly21 commented 2 years ago

I want to use the vega-lite diagram library along with a jekyll plugin. how do I use the pre build commands to run npm install? I want to install the diagram library use the command: npm install -g vega-cli vega-lite

jeffreytse commented 2 years ago

Hi @oakjelly21

This action is based on Arch Linux, so you can run any commands supported by Arch Linux, you can see installation instructions from Node official website, learn how to install nodejs and npm.

Reference: https://nodejs.org/en/download/package-manager/#arch-linux

pre_build_commands: 'pacman -S --noconfirm nodejs npm && npm install -g vega-cli vega-lite'

Thanks & Regards

oakjelly21 commented 2 years ago

Thank you for the tip. However, the build fails. image I tried running the command on my PC and it worked. I am not sure if it is a arch linux problem or a something to do with the action. I searched around the web a lot, but cant seem to find anything that works. A forum suggested that I use -Syu and omit -g, but that does not seem to work either. I do have to add that npm install does work. I tried chalk it works. So feel free to close the issue if it is not within the scope of this issue The full log if you need it. https://github.com/oakjelly21/oakjelly21.github.io/runs/6603657911?check_suite_focus=true