Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash script as build command for Netlify

I have a Bash script to build my Jekyll sites using different config files depending on environment variables, etc. Is it possible to specify a Bash script as build command in Netlify? So far, my efforts have resulted in

3:57:24 PM: Executing user command: /opt/repo/build.sh
3:57:24 PM: /usr/local/bin/build: line 32: /opt/repo/build.sh: No such file or directory
like image 284
TLP Avatar asked Dec 13 '25 10:12

TLP


1 Answers

The build commands in a Netlify deploy start at the root of your repository location, so you should be using a relative path ./build.sh rather than an absolute path.

This would allow for a Netlify container location change in the future.

like image 56
talves Avatar answered Dec 16 '25 05:12

talves



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!