--- /dev/null
+stages:
+ - build
+ - publish
+
+image: registry.gitlab.com/adehnert/gametex-deps-docker:latest
+
+build game:
+ stage: build
+ script:
+ - apt-get update && apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-pstricks python3 make
+ - make install
+ - mkdir artifacts
+ - cp faq.pdf style-guide.pdf artifacts/ && cp tea/rating.pdf artifacts/tea-rating.pdf
+
+ artifacts:
+ paths:
+ - artifacts/
+ expire_in: 1 week
+
+pages:
+ # "pages" job name is special, and triggers creation of GitLab pages:
+ # https://gitlab.com/help/user/project/pages/getting_started_part_four.md
+ stage: publish
+ script:
+ - mkdir -p public
+ - cp artifacts/*.pdf index.html public/
+
+ artifacts:
+ paths:
+ - public
+ expire_in: 1 month
+
+ only:
+ - master
+ - pages-test
--- /dev/null
+SOURCES=$(wildcard *.tex) tea/rating.tex
+OUTPUTS=$(SOURCES:.tex=.pdf)
+
+all : $(OUTPUTS)
+
+clean :
+ rm $(OUTPUTS) *.aux *.log tea/*.aux tea/*.log
+
+%.pdf : %.tex
+ cd $(@D) && pdflatex -halt-on-error $(<F) && pdflatex -halt-on-error $(<F)
+
+install : $(OUTPUTS)
+ mkdir -p artifacts/
+ cp $(filter-out tea/rating.pdf,$^) artifacts/
+ cp tea/rating.pdf artifacts/tea-rating.pdf
+
+# Delete PDF's when they fail to compile
+# See https://www.gnu.org/software/make/manual/html_node/Errors.html#Errors
+.DELETE_ON_ERROR:
--- /dev/null
+<html>
+ <head>
+ <title>Soviet Russia</title>
+ </head>
+ <body>
+ <h1>Soviet Russia</h1>
+ <ul>
+ <li><a href='faq.pdf'>FAQ</a></li>
+ <li><a href='style-guide.pdf'>Style guide</a></li>
+ <li><a href='tea-rating.pdf'>Tea ratings form</a></li>
+ </ul>
+ </body>
+</html>