从gh-pages分支复制Doxygen文档到Master分支的子文件夹中 [英] Copying Doxygen Documentation from gh-pages branch into a subfolder of Master branch

查看:397
本文介绍了从gh-pages分支复制Doxygen文档到Master分支的子文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我有一个Travis构建生成Doxygen文档,然后将其上传到我的GitHub上的 gh-pages 分支。我们还有一个目前正在从 master 分支而不是 gh-pages构建的网站。



我想要的是一个脚本,在Travis构建完成后将其从 gh-pages 分支中的文件复制到我们的网络文件的子文件夹位于 master 中,我们可以从中调整网站以链接到文档。



这是可能的,还是仅仅是从一开始就简单地将文档上传到master?

解决方案

您可以继续(上传gh分支中的文档),但再添加一个步骤:

  git submodule update --remote 

您可以 git checkout master
git rm -r gh-pages#先保存你的数据
git submodule add -b gh-pages - / remote / url / of / your / own / repo
git commit -mADd gh-pages branch as submodule
git push

由于<一个href =https://stackoverflow.com/a/18799234/6309>子模块将遵循自己的分支的最新提交 git submodule update --remote master 中完成的c $ c>足以更新 gh-pages 的内容。子文件夹(子模块的根目录)。






注意:自2016年8月起,可以从 master 分支 (并非总是 gh-pages 分支)



这会简化您的问题。

Currently I have a Travis build that generates Doxygen documentation and then uploads this into a gh-pages branch on my GitHub. We also have a website that is currently being built from the master branch not gh-pages.

What I would like is a script to run after the Travis build passes that copies over the files from the gh-pages branch into a subfolder of our web files in master from which we can adjust the website to link to the documentation.

Is this possible or would it be easier to simply upload the documentation into master from the start?

解决方案

You can go on as is (upload the documentation in the gh-branch), but add one more step:

 git submodule update --remote

You can 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

Since that submodule will follow the latest commit of its own branch, a git submodule update --remote done in master will be enough to update the content of the gh-pages subfolder (root directory of the submodule).


Note: Since August 2016, you can publish your pages right from the master branch (not always the gh-pages branch)

That would simplify your issue.

这篇关于从gh-pages分支复制Doxygen文档到Master分支的子文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆