1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-01 00:57:11 +00:00

The gh-pages push seems ready for prime time.

This commit is contained in:
Oliver Schmidt 2014-02-05 23:20:03 +01:00
parent c9fcfe8549
commit 3394033d86

View File

@ -17,28 +17,28 @@ all:
doc: html doc: html
html: $(addprefix ../html/,$(SGMLS:.sgml=.html))
mostlyclean: mostlyclean:
clean: clean:
$(RM) -r ../html $(RM) -r ../html
html: $(addprefix ../html/,$(SGMLS:.sgml=.html))
../html: ../html:
mkdir $@ @mkdir $@
../html/%.html: %.sgml | ../html ../html/%.html: %.sgml | ../html
linuxdoc -B html --split=0 --toc=$(TOC_LEVEL) $< @linuxdoc -B html --split=0 --toc=$(TOC_LEVEL) $<
mv $(@F) ../html @mv $(@F) ../html
gh-pages: html gh-pages: html
ifdef GH_TOKEN ifdef GH_TOKEN
git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES)
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt" git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt"
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de" git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de"
$(RM) -r $(GH_PAGES)/test $(RM) -r $(GH_PAGES)/doc
mkdir $(GH_PAGES)/test mkdir $(GH_PAGES)/doc
cp -R ../html/* $(GH_PAGES)/test cp -R ../html/* $(GH_PAGES)/doc
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A . git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A .
-git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)." -git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)."
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push