jeffreytse / jekyll-deploy-action

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

Could not find JS runtime #59

Closed rohitjain00 closed 1 year ago

rohitjain00 commented 1 year ago

Hi,

I'm getting this error while building

Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

As far as I've read on the internet it says that we need to install node js to rectify this issue. Do we have this dependency covered in this docker build? Also, if yes can you please take a look at the possible solution to this issue?

Here is the build link : https://github.com/rohitjain00/rohitjain00.github.io/actions/runs/4040838762/jobs/6946852704

jeffreytse commented 1 year ago

Hi @rohitjain00

Thanks for your issue, you need to install JavaScript runtime by the pre_build_commands option as below:

  # Standard usage
  - uses:  jeffreytse/jekyll-deploy-action@master
    with:
      provider: 'github'
      token: ${{ secrets.GITHUB_TOKEN }}
      pre_build_commands: pacman -S --noconfirm nodejs npm

And also welcome to star this repository for further updates in the future. : )

Thanks & Regards

rohitjain00 commented 1 year ago

Thanks for the quick response, let me try by using this pre_build_command.

rohitjain00 commented 1 year ago

Sorry for posting the updates late, it worked like a charm. Thanks for the help