I have been trying to automatically deploy my website using GitHub. I succeeded in the manual deployment, but when I try the automatic, it fails. Is there a way to prevent this error?
Here is the deploy log:
2:49:45 PM: Build ready to start 2:49:47 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6 2:49:47 PM: build-image tag: v3.4.1 2:49:47 PM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871 2:49:47 PM: Fetching cached dependencies 2:49:47 PM: Failed to fetch cache, continuing with build 2:49:47 PM: Starting to prepare the repo for build 2:49:47 PM: No cached dependencies found. Cloning fresh repo 2:49:47 PM: git clone https://github.com/hhadah/website 2:49:48 PM: Preparing Git Reference refs/heads/master 2:49:50 PM: Starting build script 2:49:50 PM: Installing dependencies 2:49:50 PM: Python version set to 2.7 2:49:51 PM: v12.18.0 is already installed. 2:49:52 PM: Now using node v12.18.0 (npm v6.14.4) 2:49:52 PM: Started restoring cached build plugins 2:49:52 PM: Finished restoring cached build plugins 2:49:52 PM: Attempting ruby version 2.7.1, read from environment 2:49:53 PM: Using ruby version 2.7.1 2:49:54 PM: Using PHP version 5.6 2:49:54 PM: 5.2 is already installed. 2:49:54 PM: Using Swift version 5.2 2:49:54 PM: Started restoring cached go cache 2:49:54 PM: Finished restoring cached go cache 2:49:54 PM: go version go1.14.4 linux/amd64 2:49:54 PM: go version go1.14.4 linux/amd64 2:49:54 PM: Installing missing commands 2:49:54 PM: Verify run directory 2:49:55 PM: 2:49:55 PM: ┌─────────────────────────────┐ 2:49:55 PM: │ Netlify Build │ 2:49:55 PM: └─────────────────────────────┘ 2:49:55 PM: 2:49:55 PM: ❯ Version 2:49:55 PM: @netlify/build 3.3.0 2:49:55 PM: 2:49:55 PM: ❯ Flags 2:49:55 PM: deployId: 5f4176d94c09937b3524fbaa 2:49:55 PM: mode: buildbot 2:49:55 PM: 2:49:55 PM: ❯ Current directory 2:49:55 PM: /opt/build/repo 2:49:55 PM: 2:49:55 PM: ❯ Config file 2:49:55 PM: No config file was defined: using default values. 2:49:55 PM: 2:49:55 PM: ❯ Context 2:49:55 PM: production 2:49:55 PM: 2:49:55 PM: ┌───────────────────────────────────┐ 2:49:55 PM: │ 1. Build command from Netlify app │ 2:49:55 PM: └───────────────────────────────────┘ 2:49:55 PM: 2:49:55 PM: $ hugo 2:49:55 PM: Error: "/opt/build/repo/themes/hugo-academic/layouts/partials/book_sidebar.html:24:1": parse failed: template: partials/book_sidebar.html:24: illegal number syntax: "-" 2:49:55 PM: 2:49:55 PM: ┌─────────────────────────────┐ 2:49:55 PM: │ "build.command" failed │ 2:49:55 PM: └─────────────────────────────┘ 2:49:55 PM: 2:49:55 PM: Error message 2:49:55 PM: Command failed with exit code 255: hugo 2:49:55 PM: 2:49:55 PM: Error location 2:49:55 PM: In Build command from Netlify app: 2:49:55 PM: hugo 2:49:55 PM: 2:49:55 PM: Resolved config 2:49:55 PM: build: 2:49:55 PM: command: hugo 2:49:55 PM: commandOrigin: ui 2:49:55 PM: publish: /opt/build/repo/public 2:49:55 PM: Caching artifacts 2:49:55 PM: Started saving build plugins 2:49:55 PM: Finished saving build plugins 2:49:55 PM: Started saving pip cache 2:49:55 PM: Finished saving pip cache 2:49:55 PM: Started saving emacs cask dependencies 2:49:55 PM: Finished saving emacs cask dependencies 2:49:55 PM: Started saving maven dependencies 2:49:55 PM: Finished saving maven dependencies 2:49:55 PM: Started saving boot dependencies 2:49:55 PM: Finished saving boot dependencies 2:49:55 PM: Started saving go dependencies 2:49:55 PM: Finished saving go dependencies 2:49:58 PM: Error running command: Build script returned non-zero exit code: 1 2:49:58 PM: Failing build: Failed to build site 2:49:58 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 2:49:58 PM: Finished processing build request in 11.718068491s
Here is my netlifly.toml:
`[build]
publish = “public”
command = “hugo --gc --minify”
your repo gets cloned fresh in those log lines. try to submit a change and see if it still fails. It might be that there is something missing that comes after the error in the first run
the following is the actuall error:
Error: "/opt/build/repo/themes/hugo-academic/layouts/partials/book_sidebar.html:24:1": parse failed: template: partials/book_sidebar.html:24: illegal number syntax: "-"
Check that file on line 24 and see what happens there. Post it here. That might require a fix.