Mhm, 결국 두 개의 Makefile 대상을 작성하여 내 문서를 푸시합니다. 나는 단지 update-doc을 만들 뿐이며 일반적으로 작동한다.
TMP_PATH="/tmp/some_path"
## the dir containing HTML docs to push to gh-pages
HTML_DIR="html"
## arbitrary dirs created by the doc build system that should be removed
TRASH=latex
update-doc: doc
rm -rf ${TMP_PATH} && cp ${HTML_DIR} ${TMP_PATH} -R && rm -rf ${HTML_DIR}
git fetch
git checkout gh-pages
cp ${TMP_PATH}/* . -R
rm -rf ${TRASH}
git add .
git commit -m "Update documentation"
git push -u origin gh-pages
rm -rf ${TMP_PATH}
git checkout master
# command to build documentation; can be customised but
# remember to also change the HTML_DIR and TRASH variables
doc:
doxygen docs/doxygen.conf
.PHONY: doc update-doc
나는 doxygen
을 사용하지만 다른 문서 시스템으로 변경할 수 있습니다.
여기에는 gh-pages
브랜치가 리모컨에 있다고 가정하고 설명 된대로 here이라고 가정합니다.
[내 관련 답변] (http://stackoverflow.com/a/29616287/946850) 및 대안 [writeup] (http://krlmlr.github.io/git-subbranch)을 참조하십시오. – krlmlr
[git branch : gh-pages] (http://stackoverflow.com/questions/4750520/git-branch-gh-pages)의 가능한 복제본 –
안녕하세요, @Martijn Pieters, 전 제 게시물을 삭제하는 것이 좋습니다. 질문은 속임수로 봉쇄됩니다. 지금까지는이 것이 없습니다. –