Failed deployment on render due to build.sh file not found

For the past few hours, I’ve been trying to deploy my Django project on render but I keep getting ./build.sh file or directory not found. I tried checking my git repo but the file is there. I don’t know what I’m doing wrong. Initially i was using django-5.2.1 but changed the version to django-3.2.1 thinking that might be the cause of the error after watching a tutorial that render doesn’t support Django version greater than 3.2.1, but I’m still getting the same thing. Your help and ideas is very is very much appreciated

==> Cloning from https://github.com/thynkcity/learnhub-api
==> Checking out commit 34046dd2839a75ee4366409d75b805cc45013973 in branch main
==> Using Python version 3.11.9 (default)
==> Docs on specifying a Python version: https://render.com/docs/python-version
==> Using Poetry version 1.7.1 (default)
==> Docs on specifying a Poetry version: https://render.com/docs/poetry-version
==> Running build command './build.sh'...
bash: line 1: ./build.sh: No such file or directory
==> Build failed 😞
==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys

Hey,

Could you provide the content of your build.sh file?

Jérémy.
Render Support, UTC+3

Yes
Apologies for the late response

set -o errexit

pip install -r requirements.txt

python manage.py collectstatic --no-input

python manage.py migrate

Hey,

My mistake, I think the error message is referring to the build.sh file not being in the root directory. Have you set a custom root directory for your service? Where is your build.sh file located in your repo? Is it in the root? If not, you’ll need to set a custom root directory to point to where your build.sh file is, or reference it with a path like ‘./backend/build.sh’ or wherever it’s located.

Jérémy.
Render Support, UTC+3

It is definitely in the root directory of my project.
If I’m not mistaken, that should be the directory where manage.py is located

v

Hello,
Thank you so much for your time and concern. I’ve been able to deploy it, it is now live.
I just added the folder the build.sh file is located(learnhub) to the Root directory field on render and it worked. I was actually confused because i saw in the documentation that the build.sh file should be added to the root directory of the project, but then, after specifying the root directory on render, the deployment went on well.
Thanks again.