2016-12-04 67 views
0

目前我有一個Travis版本生成Doxygen文檔,然後將其上傳到我的GitHub上的gh-pages分支。我們也有當前正在從master分支建立了一個網站不gh-pages.複製Doxygen文檔從gh-pages分支到主分支的子文件夾

我想是一個腳本特拉維斯編譯通過後,運行該副本在從gh-pages分支的文件到我們的網頁文件的子文件夾在master從中我們可以調整網站鏈接到文檔。

這是可能的,還是隻是簡單地將文檔從一開始上傳到主文件中?

回答

0

你可以去爲是(上傳的GH-分支的文檔),但增加一個步驟:

git submodule update --remote 

您可以declare a branch content as submodule of another branch

git checkout master 
git rm -r gh-pages # save your data first 
git submodule add -b gh-pages -- /remote/url/of/your/own/repo 
git commit -m "ADd gh-pages branch as submodule" 
git push 

自那submodule will follow the latest commit of its own branch,一個git submodule update --remotemaster中完成將足以更新gh-pages子文件夾(子模塊的根目錄)的內容。


注:Since August 2016, you can publish your pages right from the master branch(並不總是gh-pages分支)

這將簡化您的問題。

相關問題