如何在Jekyll构建中包含来自另一个repo的文件?

时间:2018-06-18 18:41:53

标签: bash git jekyll

运行此操作时,/first-repo忽略了复制的bundle exec的文件更改。如何确保包含/first-repo的文件?

#!/bin/bash

cd /first-repo;
git pull;

cd /second-repo;
git pull;

# copy folder from first repo to second repo
cp -rf /first-repo /second-repo/destination_folder;

git add -A;
git commit -m "update destination folder from first repo";
git push;

# build 
bundle exec rake build_site;

1 个答案:

答案 0 :(得分:0)

听起来你可以使用Git Submodule

继续该示例,在second-repo中,您可以实例化first-repo的git子模块,以将整个first-repo存储库作为second-repo内的目录。您还可以使用Jekyll config include变量指定first-reposecond-repo中要使用的文件。

相关问题