Cannot depoly site generated with python cactus

I followed instruction from here : https://www.netlify.com/blog/2016/04/08/a-step-by-step-guide-cactus-on-netlify/

to build and deploy my first site. But I am getting following error during build process:

Caching artifacts

10:27:46 AM: Started saving swift build

10:27:46 AM: Finished saving swift build

10:27:46 AM: Started saving build plugins

10:27:46 AM: Finished saving build plugins

10:27:46 AM: Started saving pip cache

10:27:46 AM: Finished saving pip cache

10:27:46 AM: Started saving emacs cask dependencies

10:27:46 AM: Finished saving emacs cask dependencies

10:27:46 AM: Started saving maven dependencies

10:27:46 AM: Finished saving maven dependencies

10:27:46 AM: Started saving boot dependencies

10:27:46 AM: Finished saving boot dependencies

10:27:46 AM: Started saving go dependencies

10:27:46 AM: Finished saving go dependencies

10:27:46 AM: Build script success

10:27:46 AM: Failing build: Failed to build site

10:27:46 AM: Failed during stage 'building site': Deploy directory '.build' does not exist

10:27:46 AM: Finished processing build request in 23.98783983s

My netlify.toml configuration file:

[build]
    command = "cactus build"
    publish = "/.build"

The build process does not respect publish directory defined in configuration file and always uses .build by default.

10:27:20 AM: Build ready to start

10:27:22 AM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d

10:27:22 AM: build-image tag: v3.3.20

10:27:22 AM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef

10:27:22 AM: Fetching cached dependencies

10:27:22 AM: Starting to download cache of 88.5MB

10:27:23 AM: Finished downloading cache in 515.109699ms

10:27:23 AM: Starting to extract cache

10:27:25 AM: Finished extracting cache in 2.650043146s

10:27:25 AM: Finished fetching cache in 3.186222049s

10:27:25 AM: Starting to prepare the repo for build

10:27:26 AM: Preparing Git Reference refs/heads/master

10:27:28 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: '.build' versus '' in the Netlify UI

10:27:28 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'cactus build' versus '' in the Netlify UI

10:27:28 AM: Starting build script

10:27:28 AM: Installing dependencies

10:27:28 AM: Python version set to 3.7

10:27:29 AM: Started restoring cached node version

10:27:32 AM: Finished restoring cached node version

10:27:33 AM: v12.18.0 is already installed.

Hi, @lekhnath, the publish directory should be only:

  • .build

and not:

  • /.build

Yes, I know that blog post says /.build and the build system has evolved since this was written and this no longer works.

Would you please change that to just .build (no forward slash) and let us know if that works?

@luke I made changes as you suggested but the deployment is still failing.

[build]
    command = "cactus build"
    publish = ".build"

Deployment full log:

12:28:26 PM: Build ready to start
12:28:27 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
12:28:27 PM: build-image tag: v3.3.20
12:28:27 PM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
12:28:28 PM: Fetching cached dependencies
12:28:28 PM: Starting to download cache of 88.5MB
12:28:28 PM: Finished downloading cache in 611.06382ms
12:28:28 PM: Starting to extract cache
12:28:31 PM: Finished extracting cache in 2.772844792s
12:28:31 PM: Finished fetching cache in 3.405905519s
12:28:31 PM: Starting to prepare the repo for build
12:28:32 PM: Preparing Git Reference refs/heads/master
12:28:34 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘.build’ versus ‘’ in the Netlify UI
12:28:34 PM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘cactus build’ versus ‘’ in the Netlify UI
12:28:34 PM: Starting build script
12:28:34 PM: Installing dependencies
12:28:34 PM: Python version set to 3.7
12:28:35 PM: Started restoring cached node version
12:28:37 PM: Finished restoring cached node version
12:28:38 PM: v12.18.0 is already installed.
12:28:38 PM: Now using node v12.18.0 (npm v6.14.4)
12:28:38 PM: Started restoring cached build plugins
12:28:38 PM: Finished restoring cached build plugins
12:28:38 PM: Attempting ruby version 2.7.1, read from environment
12:28:40 PM: Using ruby version 2.7.1
12:28:40 PM: Using PHP version 5.6
12:28:40 PM: Installing pip dependencies
12:28:40 PM: Started restoring cached pip cache
12:28:40 PM: Finished restoring cached pip cache
12:28:41 PM: Collecting boto==2.49.0
12:28:41 PM: Using cached boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
12:28:41 PM: Collecting Cactus==3.3.3
12:28:41 PM: Using cached Cactus-3.3.3-py2.py3-none-any.whl (313 kB)
12:28:41 PM: Collecting colorama==0.4.3
12:28:41 PM: Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB)
12:28:41 PM: Collecting colorlog==4.1.0
12:28:41 PM: Using cached colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
12:28:41 PM: Collecting Django==1.6.11
12:28:41 PM: Using cached Django-1.6.11-py2.py3-none-any.whl (6.7 MB)
12:28:42 PM: Collecting django-markwhat==1.6.2
12:28:42 PM: Using cached django_markwhat-1.6.2-py2.py3-none-any.whl (8.2 kB)
12:28:42 PM: Collecting keyring==5.7.1
12:28:42 PM: Using cached keyring-5.7.1-py2.py3-none-any.whl (60 kB)
12:28:42 PM: Collecting markdown2==2.3.9
12:28:42 PM: Using cached markdown2-2.3.9-py2.py3-none-any.whl (34 kB)
12:28:42 PM: Processing /opt/buildhome/.cache/pip/wheels/95/82/81/7aea84e7b48c17238b11e41bbdf32363806b537b2cb7ba1bac/pyScss-1.3.7-cp37-cp37m-linux_x86_64.whl
12:28:42 PM: Collecting six==1.15.0
12:28:42 PM: Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
12:28:42 PM: Processing /opt/buildhome/.cache/pip/wheels/7d/14/fa/d88fb5da77d813ea0ffca38a2ab2a052874e9e1142bad0b348/tornado-6.0.4-cp37-cp37m-linux_x86_64.whl
12:28:42 PM: Collecting argparse
12:28:42 PM: Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
12:28:43 PM: Installing collected packages: boto, argparse, Django, django-markwhat, keyring, colorlog, tornado, six, colorama, markdown2, Cactus, pyScss
12:28:48 PM: Successfully installed Cactus-3.3.3 Django-1.6.11 argparse-1.4.0 boto-2.49.0 colorama-0.4.3 colorlog-4.1.0 django-markwhat-1.6.2 keyring-5.7.1 markdown2-2.3.9 pyScss-1.3.7 six-1.15.0 tornado-6.0.4
12:28:48 PM: Pip dependencies installed
12:28:48 PM: 5.2 is already installed.
12:28:48 PM: Using Swift version 5.2
12:28:48 PM: Started restoring cached go cache
12:28:48 PM: Finished restoring cached go cache
12:28:48 PM: go version go1.14.4 linux/amd64
12:28:48 PM: go version go1.14.4 linux/amd64
12:28:48 PM: Installing missing commands
12:28:48 PM: Verify run directory
12:28:49 PM: ​
12:28:49 PM: ┌─────────────────────────────┐
12:28:49 PM: │ Netlify Build │
12:28:49 PM: └─────────────────────────────┘
12:28:49 PM: ​
12:28:49 PM: ❯ Version
12:28:49 PM: @netlify/build 2.0.27
12:28:49 PM: ​
12:28:49 PM: ❯ Flags
12:28:49 PM: deployId: 5f0c028e62ed5500089e5371
12:28:49 PM: mode: buildbot
12:28:49 PM: ​
12:28:49 PM: ❯ Current directory
12:28:49 PM: /opt/build/repo
12:28:49 PM: ​
12:28:49 PM: ❯ Config file
12:28:49 PM: /opt/build/repo/netlify.toml
12:28:49 PM: ​
12:28:49 PM: ❯ Context
12:28:49 PM: production
12:28:49 PM: ​
12:28:49 PM: ┌────────────────────────────────────┐
12:28:49 PM: │ 1. build.command from netlify.toml │
12:28:49 PM: └────────────────────────────────────┘
12:28:49 PM: ​
12:28:49 PM: $ cactus build
12:28:50 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/scss/selector.py:54: FutureWarning: Possible nested set at position 329
12:28:50 PM: ‘’’, re.VERBOSE | re.MULTILINE)/opt/buildhome/python3.7/lib/python3.7/site-packages/django/template/base.py:1119: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
12:28:50 PM: params, varargs, varkw, defaults = getargspec(func)
12:28:51 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:36: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
12:28:51 PM: return inspect.getargspec(obj)
12:28:51 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:45: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
12:28:51 PM: spec = inspect.getargspec(getattr(obj, FUNC_OBJ_ATTR))
12:28:51 PM: ​
12:28:51 PM: (build.command completed in 1.5s)
12:28:51 PM: ​
12:28:51 PM: ┌─────────────────────────────┐
12:28:51 PM: │ Netlify Build Complete │
12:28:51 PM: └─────────────────────────────┘
12:28:51 PM: ​
12:28:51 PM: (Netlify Build completed in 1.5s)
12:28:51 PM: Caching artifacts
12:28:51 PM: Started saving swift build
12:28:51 PM: Finished saving swift build
12:28:51 PM: Started saving build plugins
12:28:51 PM: Finished saving build plugins
12:28:51 PM: Started saving pip cache
12:28:51 PM: Finished saving pip cache
12:28:51 PM: Started saving emacs cask dependencies
12:28:51 PM: Finished saving emacs cask dependencies
12:28:51 PM: Started saving maven dependencies
12:28:51 PM: Finished saving maven dependencies
12:28:51 PM: Started saving boot dependencies
12:28:51 PM: Finished saving boot dependencies
12:28:51 PM: Started saving go dependencies
12:28:51 PM: Finished saving go dependencies
12:28:51 PM: Build script success
12:28:51 PM: Failing build: Failed to build site
12:28:51 PM: Failed during stage ‘building site’: Deploy directory ‘.build’ does not exist
12:28:51 PM: Finished processing build request in 23.618517751s

Hi, @lekhnath, the build system isn’t seeing the directory “.build” for some reason.

Would you please change the build command to the following?

cactus build && tree .build

This should log all the files and directories under the .build directory to the logs. However, if we see the following in the logs:

.build [error opening dir]

0 directories, 0 files

that would confirm that the build command is not creating this directory or that it doesn’t exist for some other reason.

However, if we see the directory tree, we know the files are being generated and something else is the issue.

​Please let us know if there are questions.

@luke It seems .build directory is generated by cactus build command.

netlify.toml

[build]
    command = "cactus build && tree .build"
    publish = ".build"

Deploy log:

11:14:40 AM: Build ready to start
11:14:44 AM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
11:14:44 AM: build-image tag: v3.3.20
11:14:44 AM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
11:14:45 AM: Fetching cached dependencies
11:14:45 AM: Starting to download cache of 88.5MB
11:14:46 AM: Finished downloading cache in 898.47829ms
11:14:46 AM: Starting to extract cache
11:14:49 AM: Finished extracting cache in 3.055290754s
11:14:49 AM: Finished fetching cache in 3.978062501s
11:14:49 AM: Starting to prepare the repo for build
11:14:49 AM: Preparing Git Reference refs/heads/master
11:14:52 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘.build’ versus ‘’ in the Netlify UI
11:14:52 AM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘cactus build && tree .build’ versus ‘’ in the Netlify UI
11:14:52 AM: Starting build script
11:14:52 AM: Installing dependencies
11:14:52 AM: Python version set to 3.7
11:14:53 AM: Started restoring cached node version
11:14:56 AM: Finished restoring cached node version
11:14:56 AM: v12.18.0 is already installed.
11:14:57 AM: Now using node v12.18.0 (npm v6.14.4)
11:14:57 AM: Started restoring cached build plugins
11:14:57 AM: Finished restoring cached build plugins
11:14:57 AM: Attempting ruby version 2.7.1, read from environment
11:14:59 AM: Using ruby version 2.7.1
11:14:59 AM: Using PHP version 5.6
11:14:59 AM: Installing pip dependencies
11:14:59 AM: Started restoring cached pip cache
11:14:59 AM: Finished restoring cached pip cache
11:15:00 AM: Collecting boto==2.49.0
11:15:00 AM: Using cached boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
11:15:00 AM: Collecting Cactus==3.3.3
11:15:00 AM: Using cached Cactus-3.3.3-py2.py3-none-any.whl (313 kB)
11:15:00 AM: Collecting colorama==0.4.3
11:15:00 AM: Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB)
11:15:00 AM: Collecting colorlog==4.1.0
11:15:00 AM: Using cached colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
11:15:01 AM: Collecting Django==1.6.11
11:15:01 AM: Using cached Django-1.6.11-py2.py3-none-any.whl (6.7 MB)
11:15:02 AM: Collecting django-markwhat==1.6.2
11:15:02 AM: Using cached django_markwhat-1.6.2-py2.py3-none-any.whl (8.2 kB)
11:15:02 AM: Collecting keyring==5.7.1
11:15:02 AM: Using cached keyring-5.7.1-py2.py3-none-any.whl (60 kB)
11:15:02 AM: Collecting markdown2==2.3.9
11:15:02 AM: Using cached markdown2-2.3.9-py2.py3-none-any.whl (34 kB)
11:15:02 AM: Processing /opt/buildhome/.cache/pip/wheels/95/82/81/7aea84e7b48c17238b11e41bbdf32363806b537b2cb7ba1bac/pyScss-1.3.7-cp37-cp37m-linux_x86_64.whl
11:15:02 AM: Collecting six==1.15.0
11:15:02 AM: Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
11:15:02 AM: Processing /opt/buildhome/.cache/pip/wheels/7d/14/fa/d88fb5da77d813ea0ffca38a2ab2a052874e9e1142bad0b348/tornado-6.0.4-cp37-cp37m-linux_x86_64.whl
11:15:02 AM: Collecting argparse
11:15:02 AM: Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
11:15:03 AM: Installing collected packages: boto, six, argparse, Django, django-markwhat, keyring, markdown2, tornado, colorama, colorlog, Cactus, pyScss
11:15:09 AM: Successfully installed Cactus-3.3.3 Django-1.6.11 argparse-1.4.0 boto-2.49.0 colorama-0.4.3 colorlog-4.1.0 django-markwhat-1.6.2 keyring-5.7.1 markdown2-2.3.9 pyScss-1.3.7 six-1.15.0 tornado-6.0.4
11:15:09 AM: Pip dependencies installed
11:15:09 AM: 5.2 is already installed.
11:15:09 AM: Using Swift version 5.2
11:15:09 AM: Started restoring cached go cache
11:15:09 AM: Finished restoring cached go cache
11:15:09 AM: go version go1.14.4 linux/amd64
11:15:09 AM: go version go1.14.4 linux/amd64
11:15:09 AM: Installing missing commands
11:15:09 AM: Verify run directory
11:15:11 AM: ​
11:15:11 AM: ┌─────────────────────────────┐
11:15:11 AM: │ Netlify Build │
11:15:11 AM: └─────────────────────────────┘
11:15:11 AM: ​
11:15:11 AM: ❯ Version
11:15:11 AM: @netlify/build 2.0.27
11:15:11 AM: ​
11:15:11 AM: ❯ Flags
11:15:11 AM: deployId: 5f0d42c446eca40007993e4a
11:15:11 AM: mode: buildbot
11:15:11 AM: ​
11:15:11 AM: ❯ Current directory
11:15:11 AM: /opt/build/repo
11:15:11 AM: ​
11:15:11 AM: ❯ Config file
11:15:11 AM: /opt/build/repo/netlify.toml
11:15:11 AM: ​
11:15:11 AM: ❯ Context
11:15:11 AM: production
11:15:11 AM: ​
11:15:11 AM: ┌────────────────────────────────────┐
11:15:11 AM: │ 1. build.command from netlify.toml │
11:15:11 AM: └────────────────────────────────────┘
11:15:11 AM: ​
11:15:11 AM: $ cactus build && tree .build
11:15:11 AM: /opt/buildhome/python3.7/lib/python3.7/site-packages/scss/selector.py:54: FutureWarning: Possible nested set at position 329
11:15:12 AM: ‘’’, re.VERBOSE | re.MULTILINE)/opt/buildhome/python3.7/lib/python3.7/site-packages/django/template/base.py:1119: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
11:15:12 AM: params, varargs, varkw, defaults = getargspec(func)
11:15:12 AM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:36: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
11:15:12 AM: return inspect.getargspec(obj)
11:15:12 AM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:45: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
11:15:12 AM: spec = inspect.getargspec(getattr(obj, FUNC_OBJ_ATTR))
11:15:12 AM: .build
11:15:12 AM: ├── about.html
11:15:12 AM: ├── contact.html
11:15:12 AM: ├── error.html
11:15:12 AM: ├── gallery.html
11:15:12 AM: ├── index.html
11:15:12 AM: ├── robots.txt
11:15:12 AM: ├── sitemap.xml
11:15:12 AM: ├── static
11:15:12 AM: │ └── assets
11:15:12 AM: │ ├── css
11:15:12 AM: │ │ ├── animate.min.css
11:15:12 AM: │ │ ├── bootstrap.min.css
11:15:12 AM: │ │ ├── flaticon.css
11:15:12 AM: │ │ ├── fontawesome-all.min.css
11:15:12 AM: │ │ ├── gijgo.css
11:15:12 AM: │ │ ├── magnific-popup.css
11:15:12 AM: │ │ ├── main.css
11:15:12 AM: │ │ ├── nice-select.css
11:15:12 AM: │ │ ├── owl.carousel.min.css
11:15:12 AM: │ │ ├── responsive.css
11:15:12 AM: │ │ ├── slick.css
11:15:12 AM: │ │ ├── slicknav.css
11:15:12 AM: │ │ ├── style.css
11:15:12 AM: │ │ └── themify-icons.css
11:15:12 AM: │ ├── fonts
11:15:12 AM: │ │ ├── fa-brands-400.eot
11:15:12 AM: │ │ ├── fa-brands-400.svg
11:15:12 AM: │ │ ├── fa-brands-400.ttf
11:15:12 AM: │ │ ├── fa-brands-400.woff
11:15:12 AM: │ │ ├── fa-brands-400.woff2
11:15:12 AM: │ │ ├── fa-regular-400.eot
11:15:12 AM: │ │ ├── fa-regular-400.svg
11:15:12 AM: │ │ ├── fa-regular-400.ttf
11:15:12 AM: │ │ ├── fa-regular-400.woff
11:15:12 AM: │ │ ├── fa-regular-400.woff2
11:15:12 AM: │ │ ├── fa-solid-900.eot
11:15:12 AM: │ │ ├── fa-solid-900.svg
11:15:12 AM: │ │ ├── fa-solid-900.ttf
11:15:12 AM: │ │ ├── fa-solid-900.woff
11:15:12 AM: │ │ ├── fa-solid-900.woff2
11:15:12 AM: │ │ ├── Flaticon.eot
11:15:12 AM: │ │ ├── flaticon.html
11:15:12 AM: │ │ ├── Flaticon.svg
11:15:12 AM: │ │ ├── Flaticon.ttf
11:15:12 AM: │ │ ├── Flaticon.woff
11:15:12 AM: │ │ ├── Flaticon.woff2
11:15:12 AM: │ │ ├── themify.eot
11:15:12 AM: │ │ ├── themify.svg
11:15:12 AM: │ │ ├── themify.ttf
11:15:12 AM: │ │ └── themify.woff
11:15:12 AM: │ ├── img
11:15:12 AM: │ │ ├── banner
11:15:12 AM: │ │ │ ├── banner.png
11:15:12 AM: │ │ │ ├── contact_bg.png
11:15:12 AM: │ │ │ ├── dog.png
11:15:12 AM: │ │ │ └── img.png
11:15:12 AM: │ │ ├── favicon.ico
11:15:12 AM: │ │ ├── jhapa-district-map.jpg
11:15:12 AM: │ │ ├── jhapa-nepal.jpg
11:15:12 AM: │ │ ├── logo2_footer.png
11:15:12 AM: │ │ ├── logo.png
11:15:12 AM: │ │ ├── recent
11:15:12 AM: │ │ │ ├── rcent_1.png
11:15:12 AM: │ │ │ ├── rcent_2.png
11:15:12 AM: │ │ │ └── rcent_3.png
11:15:12 AM: │ │ ├── service
11:15:12 AM: │ │ │ ├── 1.png
11:15:12 AM: │ │ │ ├── 2.png
11:15:12 AM: │ │ │ ├── 3.png
11:15:12 AM: │ │ │ ├── completed_case_1.png
11:15:12 AM: │ │ │ ├── completed_case_2.png
11:15:12 AM: │ │ │ ├── completed_case_3.png
11:15:12 AM: │ │ │ ├── completed_case_4.png
11:15:12 AM: │ │ │ ├── completed_case_5.png
11:15:12 AM: │ │ │ ├── completed_case_6.png
11:15:12 AM: │ │ │ ├── service_icon_1.png
11:15:12 AM: │ │ │ ├── service_icon_2.png
11:15:12 AM: │ │ │ ├── service_icon_3.png
11:15:12 AM: │ │ │ ├── service_icon_bg_1.png
11:15:12 AM: │ │ │ └── services_bg.png
11:15:12 AM: │ │ └── testimonial.png
11:15:12 AM: │ ├── js
11:15:12 AM: │ │ ├── animated.headline.js
11:15:12 AM: │ │ ├── bootstrap.min.js
11:15:12 AM: │ │ ├── contact.js
11:15:12 AM: │ │ ├── gijgo.min.js
11:15:12 AM: │ │ ├── jquery.ajaxchimp.min.js
11:15:12 AM: │ │ ├── jquery.form.js
11:15:12 AM: │ │ ├── jquery.magnific-popup.js
11:15:12 AM: │ │ ├── jquery.nice-select.min.js
11:15:12 AM: │ │ ├── jquery.paroller.min.js
11:15:12 AM: │ │ ├── jquery.scrollUp.min.js
11:15:12 AM: │ │ ├── jquery.slicknav.min.js
11:15:12 AM: │ │ ├── jquery.sticky.js
11:15:12 AM: │ │ ├── jquery.validate.min.js
11:15:12 AM: │ │ ├── mail-script.js
11:15:12 AM: │ │ ├── main.js
11:15:12 AM: │ │ ├── one-page-nav-min.js
11:15:12 AM: │ │ ├── owl.carousel.min.js
11:15:12 AM: │ │ ├── plugins.js
11:15:12 AM: │ │ ├── popper.min.js
11:15:12 AM: │ │ ├── slick.min.js
11:15:12 AM: │ │ ├── vendor
11:15:12 AM: │ │ │ ├── jquery-1.12.4.min.js
11:15:12 AM: │ │ │ └── modernizr-3.5.0.min.js
11:15:12 AM: │ │ └── wow.min.js
11:15:12 AM: │ └── scss
11:15:12 AM: │ ├── _blog_page.scss
11:15:12 AM: │ ├── _blog.scss
11:15:12 AM: │ ├── _bradcam.scss
11:15:12 AM: │ ├── _color.scss
11:15:12 AM: │ ├── _common.scss
11:15:12 AM: │ ├── _completed-cases.scss
11:15:12 AM: │ ├── _contact.scss
11:15:12 AM: │ ├── _david-droga.scss
11:15:12 AM: │ ├── _elements.scss
11:15:12 AM: │ ├── _extend.scss
11:15:12 AM: │ ├── _footer.scss
11:15:12 AM: │ ├── _h1-hero.scss
11:15:12 AM: │ ├── _headerMenu.scss
11:15:12 AM: │ ├── _mixins.scss
11:15:12 AM: │ ├── _overlay.scss
11:15:12 AM: │ ├── _recent.scss
11:15:12 AM: │ ├── _requestBack.scss
11:15:12 AM: │ ├── _safe-industery.scss
11:15:12 AM: │ ├── _services-details.scss
11:15:12 AM: │ ├── _services.scss
11:15:12 AM: │ ├── _services_section.scss
11:15:12 AM: │ ├── style.css
11:15:12 AM: │ ├── style.scss
11:15:12 AM: │ ├── _team.scss
11:15:12 AM: │ ├── _testimonial.scss
11:15:12 AM: │ ├── _variables.scss
11:15:12 AM: │ └── _we-trusted.scss
11:15:12 AM: └── team.html
11:15:12 AM: 11 directories, 124 files
11:15:12 AM: ​
11:15:12 AM: (build.command completed in 1.8s)
11:15:12 AM: ​
11:15:12 AM: ┌─────────────────────────────┐
11:15:12 AM: │ Netlify Build Complete │
11:15:12 AM: └─────────────────────────────┘
11:15:12 AM: ​
11:15:12 AM: (Netlify Build completed in 1.8s)
11:15:12 AM: Caching artifacts
11:15:12 AM: Started saving swift build
11:15:12 AM: Finished saving swift build
11:15:12 AM: Started saving build plugins
11:15:12 AM: Finished saving build plugins
11:15:12 AM: Started saving pip cache
11:15:13 AM: Finished saving pip cache
11:15:13 AM: Started saving emacs cask dependencies
11:15:13 AM: Finished saving emacs cask dependencies
11:15:13 AM: Started saving maven dependencies
11:15:13 AM: Finished saving maven dependencies
11:15:13 AM: Started saving boot dependencies
11:15:13 AM: Finished saving boot dependencies
11:15:13 AM: Started saving go dependencies
11:15:13 AM: Finished saving go dependencies
11:15:13 AM: Build script success
11:15:13 AM: Failing build: Failed to build site
11:15:13 AM: Failed during stage ‘building site’: Deploy directory ‘.build’ does not exist
11:15:13 AM: Finished processing build request in 28.384578659s

Hi, @lekhnath, would you be willing to test something for me?

Would it be possible to nest the entire repo in a subdirectory? So instead of all the code being in the repo base, all get moved “one level down”.

You might test this in a new repo instead of doing it with the original one. Then add a base setting like so (if the new directory is named “subdirectory”).

[build]
  base = "subdirectory"
  command = "cactus build && tree .build"
  publish = ".build"

​Please let us know if this works. I suspect the .build directory is actually being destroyed by the cache cleanup and moving that directory to a subdirectory will work around the issue (if that is the issue).

If this doesn’t work or if there are other questions, please let us know.

Hi @luke First of all thank you for the support but still I could not deploy my site.
I moved all my project source inside a new sub-directory called “website” except for the netlify configuration file “netlify.toml” .

My project structure:

Deploy log:

4:22:38 PM: Build ready to start
4:22:39 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
4:22:39 PM: build-image tag: v3.3.20
4:22:39 PM: buildbot version: be8ecf2af866e16fa4301cc5c14de2ccbbb21cf4
4:22:40 PM: Fetching cached dependencies
4:22:40 PM: Starting to download cache of 88.5MB
4:22:40 PM: Finished downloading cache in 817.294275ms
4:22:40 PM: Starting to extract cache
4:22:43 PM: Finished extracting cache in 2.474218977s
4:22:43 PM: Finished fetching cache in 3.31967569s
4:22:43 PM: Starting to prepare the repo for build
4:22:44 PM: Preparing Git Reference refs/heads/master
4:22:46 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: ‘website’ versus ‘’ in the Netlify UI
4:22:46 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘website/.build’ versus ‘’ in the Netlify UI
4:22:46 PM: Different build command detected, going to use the one specified in the Netlify configuration file: ‘cactus build && tree .build’ versus ‘’ in the Netlify UI
4:22:46 PM: Starting build script
4:22:46 PM: Installing dependencies
4:22:46 PM: Python version set to 3.7
4:22:47 PM: Started restoring cached node version
4:22:50 PM: Finished restoring cached node version
4:22:51 PM: v12.18.0 is already installed.
4:22:52 PM: Now using node v12.18.0 (npm v6.14.4)
4:22:52 PM: Started restoring cached build plugins
4:22:52 PM: Finished restoring cached build plugins
4:22:52 PM: Attempting ruby version 2.7.1, read from environment
4:22:53 PM: Using ruby version 2.7.1
4:22:54 PM: Using PHP version 5.6
4:22:54 PM: Installing pip dependencies
4:22:54 PM: Started restoring cached pip cache
4:22:54 PM: Finished restoring cached pip cache
4:23:01 PM: Collecting boto==2.49.0
4:23:01 PM: Using cached boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
4:23:01 PM: Collecting Cactus==3.3.3
4:23:01 PM: Using cached Cactus-3.3.3-py2.py3-none-any.whl (313 kB)
4:23:01 PM: Collecting colorama==0.4.3
4:23:01 PM: Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB)
4:23:01 PM: Collecting colorlog==4.1.0
4:23:01 PM: Using cached colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
4:23:01 PM: Collecting Django==1.6.11
4:23:01 PM: Using cached Django-1.6.11-py2.py3-none-any.whl (6.7 MB)
4:23:02 PM: Collecting django-markwhat==1.6.2
4:23:02 PM: Using cached django_markwhat-1.6.2-py2.py3-none-any.whl (8.2 kB)
4:23:02 PM: Collecting keyring==5.7.1
4:23:02 PM: Using cached keyring-5.7.1-py2.py3-none-any.whl (60 kB)
4:23:02 PM: Collecting markdown2==2.3.9
4:23:02 PM: Using cached markdown2-2.3.9-py2.py3-none-any.whl (34 kB)
4:23:02 PM: Processing /opt/buildhome/.cache/pip/wheels/95/82/81/7aea84e7b48c17238b11e41bbdf32363806b537b2cb7ba1bac/pyScss-1.3.7-cp37-cp37m-linux_x86_64.whl
4:23:02 PM: Collecting six==1.15.0
4:23:02 PM: Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
4:23:02 PM: Processing /opt/buildhome/.cache/pip/wheels/7d/14/fa/d88fb5da77d813ea0ffca38a2ab2a052874e9e1142bad0b348/tornado-6.0.4-cp37-cp37m-linux_x86_64.whl
4:23:02 PM: Collecting argparse
4:23:02 PM: Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
4:23:03 PM: Installing collected packages: boto, six, colorlog, tornado, Django, django-markwhat, markdown2, colorama, keyring, argparse, Cactus, pyScss
4:23:07 PM: Successfully installed Cactus-3.3.3 Django-1.6.11 argparse-1.4.0 boto-2.49.0 colorama-0.4.3 colorlog-4.1.0 django-markwhat-1.6.2 keyring-5.7.1 markdown2-2.3.9 pyScss-1.3.7 six-1.15.0 tornado-6.0.4
4:23:07 PM: Pip dependencies installed
4:23:07 PM: 5.2 is already installed.
4:23:07 PM: Using Swift version 5.2
4:23:07 PM: Started restoring cached go cache
4:23:07 PM: Finished restoring cached go cache
4:23:07 PM: go version go1.14.4 linux/amd64
4:23:07 PM: go version go1.14.4 linux/amd64
4:23:07 PM: Installing missing commands
4:23:07 PM: Verify run directory
4:23:08 PM: ​
4:23:08 PM: ┌─────────────────────────────┐
4:23:08 PM: │ Netlify Build │
4:23:08 PM: └─────────────────────────────┘
4:23:08 PM: ​
4:23:08 PM: ❯ Version
4:23:08 PM: @netlify/build 3.0.1
4:23:08 PM: ​
4:23:08 PM: ❯ Flags
4:23:08 PM: deployId: 5f117f72e2a9fd000747487a
4:23:08 PM: mode: buildbot
4:23:08 PM: ​
4:23:08 PM: ❯ Current directory
4:23:08 PM: /opt/build/repo/website
4:23:08 PM: ​
4:23:08 PM: ❯ Config file
4:23:08 PM: /opt/build/repo/netlify.toml
4:23:08 PM: ​
4:23:08 PM: ❯ Context
4:23:08 PM: production
4:23:08 PM: ​
4:23:08 PM: ┌────────────────────────────────────┐
4:23:08 PM: │ 1. build.command from netlify.toml │
4:23:08 PM: └────────────────────────────────────┘
4:23:08 PM: ​
4:23:08 PM: $ cactus build && tree .build
4:23:09 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/scss/selector.py:54: FutureWarning: Possible nested set at position 329
4:23:10 PM: ‘’’, re.VERBOSE | re.MULTILINE)/opt/buildhome/python3.7/lib/python3.7/site-packages/django/template/base.py:1119: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
4:23:10 PM: params, varargs, varkw, defaults = getargspec(func)
4:23:10 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:36: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
4:23:10 PM: return inspect.getargspec(obj)
4:23:10 PM: /opt/buildhome/python3.7/lib/python3.7/site-packages/cactus/utils/internal.py:45: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
4:23:10 PM: spec = inspect.getargspec(getattr(obj, FUNC_OBJ_ATTR))
4:23:10 PM: .build
4:23:10 PM: ├── about.html
4:23:10 PM: ├── contact.html
4:23:10 PM: ├── error.html
4:23:10 PM: ├── gallery.html
4:23:10 PM: ├── index.html
4:23:10 PM: ├── robots.txt
4:23:10 PM: ├── sitemap.xml
4:23:10 PM: ├── static
4:23:10 PM: │ └── assets
4:23:10 PM: │ ├── css
4:23:10 PM: │ │ ├── animate.min.css
4:23:10 PM: │ │ ├── bootstrap.min.css
4:23:10 PM: │ │ ├── flaticon.css
4:23:10 PM: │ │ ├── fontawesome-all.min.css
4:23:10 PM: │ │ ├── gijgo.css
4:23:10 PM: │ │ ├── magnific-popup.css
4:23:10 PM: │ │ ├── main.css
4:23:10 PM: │ │ ├── nice-select.css
4:23:10 PM: │ │ ├── owl.carousel.min.css
4:23:10 PM: │ │ ├── responsive.css
4:23:10 PM: │ │ ├── slick.css
4:23:10 PM: │ │ ├── slicknav.css
4:23:10 PM: │ │ ├── style.css
4:23:10 PM: │ │ └── themify-icons.css
4:23:10 PM: │ ├── fonts
4:23:10 PM: │ │ ├── fa-brands-400.eot
4:23:10 PM: │ │ ├── fa-brands-400.svg
4:23:10 PM: │ │ ├── fa-brands-400.ttf
4:23:10 PM: │ │ ├── fa-brands-400.woff
4:23:10 PM: │ │ ├── fa-brands-400.woff2
4:23:10 PM: │ │ ├── fa-regular-400.eot
4:23:10 PM: │ │ ├── fa-regular-400.svg
4:23:10 PM: │ │ ├── fa-regular-400.ttf
4:23:10 PM: │ │ ├── fa-regular-400.woff
4:23:10 PM: │ │ ├── fa-regular-400.woff2
4:23:10 PM: │ │ ├── fa-solid-900.eot
4:23:10 PM: │ │ ├── fa-solid-900.svg
4:23:10 PM: │ │ ├── fa-solid-900.ttf
4:23:10 PM: │ │ ├── fa-solid-900.woff
4:23:10 PM: │ │ ├── fa-solid-900.woff2
4:23:10 PM: │ │ ├── Flaticon.eot
4:23:10 PM: │ │ ├── flaticon.html
4:23:10 PM: │ │ ├── Flaticon.svg
4:23:10 PM: │ │ ├── Flaticon.ttf
4:23:10 PM: │ │ ├── Flaticon.woff
4:23:10 PM: │ │ ├── Flaticon.woff2
4:23:10 PM: │ │ ├── themify.eot
4:23:10 PM: │ │ ├── themify.svg
4:23:10 PM: │ │ ├── themify.ttf
4:23:10 PM: │ │ └── themify.woff
4:23:10 PM: │ ├── img
4:23:10 PM: │ │ ├── banner
4:23:10 PM: │ │ │ ├── banner.png
4:23:10 PM: │ │ │ ├── contact_bg.png
4:23:10 PM: │ │ │ ├── dog.png
4:23:10 PM: │ │ │ └── img.png
4:23:10 PM: │ │ ├── favicon.ico
4:23:10 PM: │ │ ├── jhapa-district-map.jpg
4:23:10 PM: │ │ ├── jhapa-nepal.jpg
4:23:10 PM: │ │ ├── logo2_footer.png
4:23:10 PM: │ │ ├── logo.png
4:23:10 PM: │ │ ├── recent
4:23:10 PM: │ │ │ ├── rcent_1.png
4:23:10 PM: │ │ │ ├── rcent_2.png
4:23:10 PM: │ │ │ └── rcent_3.png
4:23:10 PM: │ │ ├── service
4:23:10 PM: │ │ │ ├── 1.png
4:23:10 PM: │ │ │ ├── 2.png
4:23:10 PM: │ │ │ ├── 3.png
4:23:10 PM: │ │ │ ├── completed_case_1.png
4:23:10 PM: │ │ │ ├── completed_case_2.png
4:23:10 PM: │ │ │ ├── completed_case_3.png
4:23:10 PM: │ │ │ ├── completed_case_4.png
4:23:10 PM: │ │ │ ├── completed_case_5.png
4:23:10 PM: │ │ │ ├── completed_case_6.png
4:23:10 PM: │ │ │ ├── service_icon_1.png
4:23:10 PM: │ │ │ ├── service_icon_2.png
4:23:10 PM: │ │ │ ├── service_icon_3.png
4:23:10 PM: │ │ │ ├── service_icon_bg_1.png
4:23:10 PM: │ │ │ └── services_bg.png
4:23:10 PM: │ │ └── testimonial.png
4:23:10 PM: │ ├── js
4:23:10 PM: │ │ ├── animated.headline.js
4:23:10 PM: │ │ ├── bootstrap.min.js
4:23:10 PM: │ │ ├── contact.js
4:23:10 PM: │ │ ├── gijgo.min.js
4:23:10 PM: │ │ ├── jquery.ajaxchimp.min.js
4:23:10 PM: │ │ ├── jquery.form.js
4:23:10 PM: │ │ ├── jquery.magnific-popup.js
4:23:10 PM: │ │ ├── jquery.nice-select.min.js
4:23:10 PM: │ │ ├── jquery.paroller.min.js
4:23:10 PM: │ │ ├── jquery.scrollUp.min.js
4:23:10 PM: │ │ ├── jquery.slicknav.min.js
4:23:10 PM: │ │ ├── jquery.sticky.js
4:23:10 PM: │ │ ├── jquery.validate.min.js
4:23:10 PM: │ │ ├── mail-script.js
4:23:10 PM: │ │ ├── main.js
4:23:10 PM: │ │ ├── one-page-nav-min.js
4:23:10 PM: │ │ ├── owl.carousel.min.js
4:23:10 PM: │ │ ├── plugins.js
4:23:10 PM: │ │ ├── popper.min.js
4:23:10 PM: │ │ ├── slick.min.js
4:23:10 PM: │ │ ├── vendor
4:23:10 PM: │ │ │ ├── jquery-1.12.4.min.js
4:23:10 PM: │ │ │ └── modernizr-3.5.0.min.js
4:23:10 PM: │ │ └── wow.min.js
4:23:10 PM: │ └── scss
4:23:10 PM: │ ├── _blog_page.scss
4:23:10 PM: │ ├── _blog.scss
4:23:10 PM: │ ├── _bradcam.scss
4:23:10 PM: │ ├── _color.scss
4:23:10 PM: │ ├── _common.scss
4:23:10 PM: │ ├── _completed-cases.scss
4:23:10 PM: │ ├── _contact.scss
4:23:10 PM: │ ├── _david-droga.scss
4:23:10 PM: │ ├── _elements.scss
4:23:10 PM: │ ├── _extend.scss
4:23:10 PM: │ ├── _footer.scss
4:23:10 PM: │ ├── _h1-hero.scss
4:23:10 PM: │ ├── _headerMenu.scss
4:23:10 PM: │ ├── _mixins.scss
4:23:10 PM: │ ├── _overlay.scss
4:23:10 PM: │ ├── _recent.scss
4:23:10 PM: │ ├── _requestBack.scss
4:23:10 PM: │ ├── _safe-industery.scss
4:23:10 PM: │ ├── _services-details.scss
4:23:10 PM: │ ├── _services.scss
4:23:10 PM: │ ├── _services_section.scss
4:23:10 PM: │ ├── style.css
4:23:10 PM: │ ├── style.scss
4:23:10 PM: │ ├── _team.scss
4:23:10 PM: │ ├── _testimonial.scss
4:23:10 PM: │ ├── _variables.scss
4:23:10 PM: │ └── _we-trusted.scss
4:23:10 PM: └── team.html
4:23:10 PM: 11 directories, 124 files
4:23:10 PM: ​
4:23:10 PM: (build.command completed in 1.9s)
4:23:10 PM: ​
4:23:10 PM: ┌─────────────────────────────┐
4:23:10 PM: │ Netlify Build Complete │
4:23:10 PM: └─────────────────────────────┘
4:23:10 PM: ​
4:23:10 PM: (Netlify Build completed in 1.9s)
4:23:10 PM: Caching artifacts
4:23:10 PM: Started saving swift build
4:23:10 PM: Finished saving swift build
4:23:10 PM: Started saving build plugins
4:23:10 PM: Finished saving build plugins
4:23:10 PM: Started saving pip cache
4:23:10 PM: Finished saving pip cache
4:23:10 PM: Started saving emacs cask dependencies
4:23:11 PM: Finished saving emacs cask dependencies
4:23:11 PM: Started saving maven dependencies
4:23:11 PM: Finished saving maven dependencies
4:23:11 PM: Started saving boot dependencies
4:23:11 PM: Finished saving boot dependencies
4:23:11 PM: Started saving go dependencies
4:23:11 PM: Finished saving go dependencies
4:23:11 PM: Build script success
4:23:11 PM: Failing build: Failed to build site
4:23:11 PM: Failed during stage ‘building site’: Deploy directory ‘website/.build’ does not exist
4:23:11 PM: Finished processing build request in 31.309058529s

One last thing to try: Can you try making the following change:

[build]
  command = "cactus build && mv .build build"
  publish = "build/"

This renames the .build folder to simply build without the prepended dot. If this works, then it is an issue specifically using a publish directory that starts with a dot. We’ll get an issue filed for that.

@Dennis Yes, finally it worked :slight_smile: It seems Netlify does not allow publishing hidden or dot directories. My final netlify.toml configuration file is as follows:

[build]
    base = "website/"
    command = "cactus build && rm -rf dist/ && mv .build/ dist/"
    publish = "dist/"

Thanks a lot for the help :pray: