google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.61k stars 901 forks source link

netlify.toml #427

Closed MarcinKlejna closed 3 years ago

MarcinKlejna commented 3 years ago

Hello I have a problem with the netlify.toml file here is my file:

[build]
    publish = "public"
    command = "cd themes/docsy && git submodule update -f --init && npm install postcss-cli cd ../.. && hugo"

[build.environment]
    HUGO_VERSION = "0.80.0"
    HUGO_ENV = "production"

I get an error: Error: Deploy did not succeed: Deploy directory 'public' does not exist

Log netlify.com

2:48:20 PM: $ cd themes/docsy && git submodule update -f --init && npm install postcss-cli cd ../.. && hugo
2:48:21 PM: Submodule path 'assets/vendor/Font-Awesome': checked out '951a0d011f8c832991750c16136f8e260efa60b5'
2:48:21 PM: Submodule path 'assets/vendor/bootstrap': checked out 'a716fb03f965dc0846df479e14388b1b4b93d7ce'
2:48:26 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
2:48:26 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
2:48:26 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:48:26 PM: + cd@0.3.3
2:48:26 PM: + postcss-cli@7.1.2
2:48:26 PM: added 1 package from 1 contributor, updated 1 package and audited 115 packages in 3.736s
2:48:26 PM: 3 packages are looking for funding
2:48:26 PM:   run `npm fund` for details
2:48:26 PM: found 0 vulnerabilities
2:48:26 PM: Start building sites …
2:48:28 PM:                    | EN
2:48:28 PM: -------------------+-----
2:48:28 PM:   Pages            |  7
2:48:28 PM:   Paginator pages  |  0
2:48:28 PM:   Non-page files   |  0
2:48:28 PM:   Static files     | 38
2:48:28 PM:   Processed images |  0
2:48:28 PM:   Aliases          |  0
2:48:28 PM:   Sitemaps         |  1
2:48:28 PM:   Cleaned          |  0
2:48:28 PM: Total in 1714 ms
2:48:28 PM: ​
2:48:28 PM: (build.command completed in 7.4s)
2:48:28 PM: ​
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM:   2. onPostBuild command from @netlify/plugin-deploy-core       
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM: ​
2:48:28 PM: ​
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM:   Plugin "@netlify/plugin-deploy-core" failed                   
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM: ​
2:48:28 PM:   Error message
2:48:28 PM:   Error: Deploy did not succeed: Deploy directory 'public' does not exist
2:48:28 PM: ​
2:48:28 PM:   Plugin details
2:48:28 PM:   Package:        @netlify/plugin-deploy-core
2:48:28 PM:   Version:        8.1.0
2:48:28 PM:   Repository:     git+https://github.com/netlify/build.git
2:48:28 PM:   npm link:       https://www.npmjs.com/package/@netlify/build
2:48:28 PM:   Report issues:  https://github.com/netlify/build/issues
2:48:28 PM: ​
2:48:28 PM:   Error location
2:48:28 PM:   In "onPostBuild" event in "@netlify/plugin-deploy-core" from core
2:48:28 PM: ​
2:48:28 PM:   Resolved config
2:48:28 PM:   build:
2:48:28 PM:     command: cd themes/docsy && git submodule update -f --init && npm install postcss-cli cd ../.. && hugo
2:48:28 PM:     commandOrigin: config
2:48:28 PM:     environment:
2:48:28 PM:       - HUGO_VERSION
2:48:28 PM:       - HUGO_ENV
2:48:28 PM:     publish: /opt/build/repo/public
2:48:28 PM: Caching artifacts
2:48:28 PM: Started saving node modules
2:48:28 PM: Finished saving node modules
2:48:28 PM: Started saving build plugins
2:48:28 PM: Finished saving build plugins
2:48:28 PM: Started saving pip cache
2:48:28 PM: Finished saving pip cache
2:48:28 PM: Started saving emacs cask dependencies
2:48:28 PM: Finished saving emacs cask dependencies
2:48:28 PM: Started saving maven dependencies
2:48:28 PM: Finished saving maven dependencies
2:48:28 PM: Started saving boot dependencies
2:48:28 PM: Finished saving boot dependencies
2:48:28 PM: Started saving rust rustup cache
2:48:28 PM: Finished saving rust rustup cache
2:48:28 PM: Started saving go dependencies
2:48:28 PM: Finished saving go dependencies
2:48:28 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:48:28 PM: Failing build: Failed to build site
2:48:28 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:48:28 PM: Finished processing build request in 30.261506662s

Please give me some tips on how to fix it

MarcinKlejna commented 3 years ago

problem solved

 [build]
 publish = "public"
 command = "cd themes/docsy && git submodule update -f --init && cd ../..   && hugo"   

[build.environment]
HUGO_VERSION = "0.80.0"
HUGO_ENV = "production"