Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Bash 脚本可以根据环境变量等使用不同的配置文件来构建我的 Jekyll 站点。是否可以在 Netlify 中指定一个 Bash 脚本作为构建命令?到目前为止,我的努力已经导致
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
Netlify 部署中的构建命令从存储库位置的根目录开始,因此您应该使用相对路径./build.sh而不是绝对路径。
./build.sh
这将允许将来更改 Netlify 容器位置。
事实证明,repo 不在/opt/repo但在/opt/build/repo
/opt/repo
/opt/build/repo