helaili / jekyll-action

A GitHub Action to publish Jekyll based content as a GitHub Pages site
MIT License
250 stars 120 forks source link

Could not find a JavaScript runtime #47

Closed zachbryant closed 4 years ago

zachbryant commented 4 years ago

I am trying to get an action to install purgecss with my project so the jekyll-purgecss gem will run correctly. Everything installs fine, but when I try to build Jekyll says it could not detect a JS runtime:

/github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

No luck after adding the execjs and therubyracer gems as suggested online. Node is clearly present otherwise that step would be failing. Any suggestions?

My main.yml:

name: Publish to Github Pages
on:
  push:
    branches:
      - gh-pages-redesign

jobs:
  build-publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions/cache@v1
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-
      - name: Use Node.js 12.14.1
        uses: actions/setup-node@v1
        with:
          node-version: '12.14.1'
      - name: Install dependencies
        run: |
          npm install
          npm install --only=dev
      - uses: helaili/jekyll-action@master
        env:
          JEKYLL_PAT: ${{ secrets.JEKYLL_BUILD_TOKEN }}
Here's the full log: ``` 2020-07-13T09:39:14.4689793Z Starting the Jekyll Action 2020-07-13T09:39:17.5690573Z Fetching gem metadata from https://rubygems.org/......... 2020-07-13T09:39:17.6004982Z Fetching concurrent-ruby 1.1.6 2020-07-13T09:39:17.8646769Z Installing concurrent-ruby 1.1.6 2020-07-13T09:39:17.9638647Z Fetching i18n 1.8.3 2020-07-13T09:39:18.1343293Z Installing i18n 1.8.3 2020-07-13T09:39:18.1603208Z Fetching minitest 5.14.1 2020-07-13T09:39:18.3470621Z Installing minitest 5.14.1 2020-07-13T09:39:18.3658891Z Fetching thread_safe 0.3.6 2020-07-13T09:39:18.5670758Z Installing thread_safe 0.3.6 2020-07-13T09:39:18.5984923Z Fetching tzinfo 1.2.7 2020-07-13T09:39:18.8128286Z Installing tzinfo 1.2.7 2020-07-13T09:39:18.8719800Z Fetching zeitwerk 2.3.0 2020-07-13T09:39:19.0173083Z Installing zeitwerk 2.3.0 2020-07-13T09:39:19.0365882Z Fetching activesupport 6.0.3.1 2020-07-13T09:39:19.2649536Z Installing activesupport 6.0.3.1 2020-07-13T09:39:19.3700366Z Fetching public_suffix 4.0.5 2020-07-13T09:39:19.5709955Z Installing public_suffix 4.0.5 2020-07-13T09:39:19.6013670Z Fetching addressable 2.7.0 2020-07-13T09:39:19.8027380Z Installing addressable 2.7.0 2020-07-13T09:39:19.8316515Z Using bundler 2.1.4 2020-07-13T09:39:19.8329066Z Fetching colorator 1.1.0 2020-07-13T09:39:19.9560733Z Installing colorator 1.1.0 2020-07-13T09:39:19.9664469Z Fetching cssminify2 2.0.1 2020-07-13T09:39:20.2040554Z Installing cssminify2 2.0.1 2020-07-13T09:39:20.2709247Z Fetching eventmachine 1.2.7 2020-07-13T09:39:20.5090594Z Installing eventmachine 1.2.7 with native extensions 2020-07-13T09:39:31.5662936Z Fetching http_parser.rb 0.6.0 2020-07-13T09:39:31.7906768Z Installing http_parser.rb 0.6.0 with native extensions 2020-07-13T09:39:33.1462440Z Fetching em-websocket 0.5.1 2020-07-13T09:39:33.3001315Z Installing em-websocket 0.5.1 2020-07-13T09:39:33.3328553Z Fetching execjs 2.7.0 2020-07-13T09:39:33.4843528Z Installing execjs 2.7.0 2020-07-13T09:39:33.5047500Z Fetching ffi 1.13.1 2020-07-13T09:39:33.9171514Z Installing ffi 1.13.1 with native extensions 2020-07-13T09:39:42.4770915Z Fetching forwardable-extended 2.6.0 2020-07-13T09:39:42.6031279Z Installing forwardable-extended 2.6.0 2020-07-13T09:39:42.6105997Z Fetching gemoji 3.0.1 2020-07-13T09:39:42.7920806Z Installing gemoji 3.0.1 2020-07-13T09:39:42.8086628Z Fetching mini_portile2 2.4.0 2020-07-13T09:39:42.9560675Z Installing mini_portile2 2.4.0 2020-07-13T09:39:42.9802453Z Fetching nokogiri 1.10.9 2020-07-13T09:39:44.2105600Z Installing nokogiri 1.10.9 with native extensions 2020-07-13T09:40:26.5718888Z Fetching html-pipeline 2.13.0 2020-07-13T09:40:26.7279691Z Installing html-pipeline 2.13.0 2020-07-13T09:40:26.7498659Z Fetching htmlcompressor 0.4.0 2020-07-13T09:40:26.9052270Z Installing htmlcompressor 0.4.0 2020-07-13T09:40:26.9666117Z Fetching sassc 2.4.0 2020-07-13T09:40:27.2294816Z Installing sassc 2.4.0 with native extensions 2020-07-13T09:41:58.1280919Z Fetching jekyll-sass-converter 2.1.0 2020-07-13T09:41:58.2551344Z Installing jekyll-sass-converter 2.1.0 2020-07-13T09:41:58.2651139Z Fetching rb-fsevent 0.10.4 2020-07-13T09:41:58.4390068Z Installing rb-fsevent 0.10.4 2020-07-13T09:41:58.4580089Z Fetching rb-inotify 0.10.1 2020-07-13T09:41:58.6045280Z Installing rb-inotify 0.10.1 2020-07-13T09:41:58.6200528Z Fetching listen 3.2.1 2020-07-13T09:41:58.7753497Z Installing listen 3.2.1 2020-07-13T09:41:58.7950186Z Fetching jekyll-watch 2.2.1 2020-07-13T09:41:58.9168429Z Installing jekyll-watch 2.2.1 2020-07-13T09:41:58.9246840Z Fetching rexml 3.2.4 2020-07-13T09:41:59.1129554Z Installing rexml 3.2.4 2020-07-13T09:41:59.1407851Z Fetching kramdown 2.3.0 2020-07-13T09:41:59.3548194Z Installing kramdown 2.3.0 2020-07-13T09:41:59.5987660Z Fetching kramdown-parser-gfm 1.1.0 2020-07-13T09:41:59.7191091Z Installing kramdown-parser-gfm 1.1.0 2020-07-13T09:41:59.7440818Z Fetching liquid 4.0.3 2020-07-13T09:41:59.9242746Z Installing liquid 4.0.3 2020-07-13T09:41:59.9703212Z Fetching mercenary 0.3.6 2020-07-13T09:42:00.1171313Z Installing mercenary 0.3.6 2020-07-13T09:42:00.1322310Z Fetching pathutil 0.16.2 2020-07-13T09:42:00.2553221Z Installing pathutil 0.16.2 2020-07-13T09:42:00.2620515Z Fetching rouge 3.20.0 2020-07-13T09:42:00.5594817Z Installing rouge 3.20.0 2020-07-13T09:42:00.7621782Z Fetching safe_yaml 1.0.5 2020-07-13T09:42:00.9088673Z Installing safe_yaml 1.0.5 2020-07-13T09:42:00.9321416Z Fetching unicode-display_width 1.7.0 2020-07-13T09:42:01.0525153Z Installing unicode-display_width 1.7.0 2020-07-13T09:42:01.0622400Z Fetching terminal-table 1.8.0 2020-07-13T09:42:01.2095195Z Installing terminal-table 1.8.0 2020-07-13T09:42:01.2227642Z Fetching jekyll 4.0.1 2020-07-13T09:42:01.4268414Z Installing jekyll 4.0.1 2020-07-13T09:42:01.4911983Z Fetching jekyll-feed 0.13.0 2020-07-13T09:42:01.6381557Z Installing jekyll-feed 0.13.0 2020-07-13T09:42:01.6567385Z Using json 2.3.0 2020-07-13T09:42:01.6572584Z Fetching json-minify 0.0.3 2020-07-13T09:42:01.7742794Z Installing json-minify 0.0.3 2020-07-13T09:42:01.7847052Z Fetching uglifier 4.2.0 2020-07-13T09:42:02.0035700Z Installing uglifier 4.2.0 2020-07-13T09:42:02.0274758Z Fetching jekyll-minifier 0.1.10 2020-07-13T09:42:02.1756289Z Installing jekyll-minifier 0.1.10 2020-07-13T09:42:02.1939453Z Fetching jekyll-purgecss 0.3.0 2020-07-13T09:42:02.3194990Z Installing jekyll-purgecss 0.3.0 2020-07-13T09:42:02.3326354Z Fetching jekyll-redirect-from 0.16.0 2020-07-13T09:42:02.4811886Z Installing jekyll-redirect-from 0.16.0 2020-07-13T09:42:02.5044501Z Fetching jekyll-seo-tag 2.6.1 2020-07-13T09:42:02.6523541Z Installing jekyll-seo-tag 2.6.1 2020-07-13T09:42:02.6672992Z Fetching jekyll-target-blank 2.0.0 2020-07-13T09:42:02.9435594Z Installing jekyll-target-blank 2.0.0 2020-07-13T09:42:02.9782435Z Fetching jemoji 0.12.0 2020-07-13T09:42:03.1006263Z Installing jemoji 0.12.0 2020-07-13T09:42:03.1099385Z Bundle complete! 11 Gemfile dependencies, 50 gems now installed. 2020-07-13T09:42:03.1099661Z Bundled gems are installed into `./vendor/bundle` 2020-07-13T09:42:03.1100412Z Post-install message from i18n: 2020-07-13T09:42:03.1100490Z 2020-07-13T09:42:03.1100714Z HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. 2020-07-13T09:42:03.1100907Z But that may break your application. 2020-07-13T09:42:03.1100995Z 2020-07-13T09:42:03.1101231Z If you are upgrading your Rails application from an older version of Rails: 2020-07-13T09:42:03.1101530Z 2020-07-13T09:42:03.1102315Z Please check your Rails app for 'config.i18n.fallbacks = true'. 2020-07-13T09:42:03.1102705Z If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 2020-07-13T09:42:03.1103043Z 'config.i18n.fallbacks = [I18n.default_locale]'. 2020-07-13T09:42:03.1103261Z If not, fallbacks will be broken in your app by I18n 1.1.x. 2020-07-13T09:42:03.1103351Z 2020-07-13T09:42:03.1103568Z If you are starting a NEW Rails application, you can ignore this notice. 2020-07-13T09:42:03.1103641Z 2020-07-13T09:42:03.1103893Z For more info see: 2020-07-13T09:42:03.1104224Z https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 2020-07-13T09:42:03.1104353Z 2020-07-13T09:42:03.1104696Z Post-install message from html-pipeline: 2020-07-13T09:42:03.1105024Z ------------------------------------------------- 2020-07-13T09:42:03.1105326Z Thank you for installing html-pipeline! 2020-07-13T09:42:03.1105508Z You must bundle Filter gem dependencies. 2020-07-13T09:42:03.1105837Z See html-pipeline README.md for more details. 2020-07-13T09:42:03.1106179Z https://github.com/jch/html-pipeline#dependencies 2020-07-13T09:42:03.1106514Z ------------------------------------------------- 2020-07-13T09:42:03.1106805Z Post-install message from jekyll: 2020-07-13T09:42:03.1107213Z ------------------------------------------------------------------------------------- 2020-07-13T09:42:03.1107421Z Jekyll 4.0 comes with some major changes, notably: 2020-07-13T09:42:03.1107487Z 2020-07-13T09:42:03.1107672Z * Our `link` tag now comes with the `relative_url` filter incorporated into it. 2020-07-13T09:42:03.1107869Z You should no longer prepend `{{ site.baseurl }}` to `{% link foo.md %}` 2020-07-13T09:42:03.1108070Z For further details: https://github.com/jekyll/jekyll/pull/6727 2020-07-13T09:42:03.1108165Z 2020-07-13T09:42:03.1108343Z * Our `post_url` tag now comes with the `relative_url` filter incorporated into it. 2020-07-13T09:42:03.1108713Z You shouldn't prepend `{{ site.baseurl }}` to `{% post_url 2019-03-27-hello %}` 2020-07-13T09:42:03.1108917Z For further details: https://github.com/jekyll/jekyll/pull/7589 2020-07-13T09:42:03.1108996Z 2020-07-13T09:42:03.1109177Z * Support for deprecated configuration options has been removed. We will no longer 2020-07-13T09:42:03.1109375Z output a warning and gracefully assign their values to the newer counterparts 2020-07-13T09:42:03.1109510Z internally. 2020-07-13T09:42:03.1109911Z ------------------------------------------------------------------------------------- 2020-07-13T09:42:03.7356433Z Configuration file: /github/workspace/_config.yml 2020-07-13T09:42:03.8207047Z  ------------------------------------------------ 2020-07-13T09:42:03.8207565Z  Jekyll 4.0.1 Please append `--trace` to the `build` command  2020-07-13T09:42:03.8207954Z  for any additional information or backtrace.  2020-07-13T09:42:03.8208341Z  ------------------------------------------------ 2020-07-13T09:42:03.8209567Z /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) 2020-07-13T09:42:03.8210005Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `' 2020-07-13T09:42:03.8210401Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `' 2020-07-13T09:42:03.8210774Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `require' 2020-07-13T09:42:03.8211160Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `' 2020-07-13T09:42:03.8211557Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:1:in `require' 2020-07-13T09:42:03.8211966Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:1:in `' 2020-07-13T09:42:03.8212558Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:60:in `require' 2020-07-13T09:42:03.8212984Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail' 2020-07-13T09:42:03.8213360Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:57:in `each' 2020-07-13T09:42:03.8213857Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/external.rb:57:in `require_with_graceful_fail' 2020-07-13T09:42:03.8214287Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/plugin_manager.rb:30:in `require_gems' 2020-07-13T09:42:03.8214695Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/plugin_manager.rb:22:in `conscientious_require' 2020-07-13T09:42:03.8215072Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:124:in `setup' 2020-07-13T09:42:03.8215446Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:34:in `initialize' 2020-07-13T09:42:03.8215826Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:30:in `new' 2020-07-13T09:42:03.8216212Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:30:in `process' 2020-07-13T09:42:03.8216633Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail' 2020-07-13T09:42:03.8217004Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each' 2020-07-13T09:42:03.8217407Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail' 2020-07-13T09:42:03.8217850Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program' 2020-07-13T09:42:03.8218260Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 2020-07-13T09:42:03.8218644Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 2020-07-13T09:42:03.8219029Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 2020-07-13T09:42:03.8219405Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 2020-07-13T09:42:03.8219773Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 2020-07-13T09:42:03.8220140Z from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.0.1/exe/jekyll:15:in `' 2020-07-13T09:42:03.8220460Z from /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `load' 2020-07-13T09:42:03.8220805Z from /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `' 2020-07-13T09:42:03.8221117Z from /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load' 2020-07-13T09:42:03.8221431Z from /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load' 2020-07-13T09:42:03.8221734Z from /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run' 2020-07-13T09:42:03.8222034Z from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec' 2020-07-13T09:42:03.8222374Z from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 2020-07-13T09:42:03.8222738Z from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 2020-07-13T09:42:03.8223072Z from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch' 2020-07-13T09:42:03.8223379Z from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch' 2020-07-13T09:42:03.8223713Z from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start' 2020-07-13T09:42:03.8224105Z from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24:in `start' 2020-07-13T09:42:03.8224475Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in ' 2020-07-13T09:42:03.8224822Z from /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors' 2020-07-13T09:42:03.8225178Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `' 2020-07-13T09:42:03.8225516Z from /usr/local/bin/bundle:23:in `load' 2020-07-13T09:42:03.8225812Z from /usr/local/bin/bundle:23:in `
' ```
helaili commented 4 years ago

I don't think there's a JS runtime in the Docker container used by the action, and I'd like to keep the container as light as possible. Maybe you could give a try to this action that's JS based?

zachbryant commented 4 years ago

Thank you, that's just what I needed!