From: Oliver Schmidt
Date: Tue, 4 Feb 2014 23:20:43 +0000 (+0100)
Subject: First test of actual html page push.
X-Git-Tag: V2.15~180
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37c923815c84a16e2c6e9341ff8c37ce9fe3a9eb;p=cc65
First test of actual html page push.
---
diff --git a/doc/Makefile b/doc/Makefile
index d4860ca40..aabe59d49 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,10 +1,34 @@
+.PHONY: all html gh-pages
+
+.SUFFIXES:
+
+all: html
+
+html: $(addprefix ../html/,$(subst .sgml,.html,$(wildcard *.sgml)))
+
+../html:
+ mkdir $@
+
+../html/%.html: %.sgml | ../html
+ linuxdoc -B html --split=0 --toc=2 $<
+ mv *.html $(@D)
+
+../html/coding.html: coding.sgml | ../html
+ linuxdoc -B html --split=0 $<
+ mv *.html $(@D)
+
+../html/index.html: index.sgml | ../html
+ linuxdoc -B html --split=0 $<
+ mv *.html $(@D)
+
GH_PAGES = ../../gh-pages
-gh-pages:
+gh-pages: html
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.email "ol.sc@web.de"
- echo date > $(GH_PAGES)/testfile.txt
+ rm -rf $(GH_PAGES)/test
+ cp -R ../html/* $(GH_PAGES)/test
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 push