Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #29 from lamtev/master
Browse files Browse the repository at this point in the history
add deploy to github releases
  • Loading branch information
ejiek authored Aug 30, 2016
2 parents f030631 + 8d2b266 commit c2c6fc0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
language: generic

sudo: required

dist: trusty

services:
- docker

install:
- docker pull lamtev/latex-build-tools
- docker pull lamtev/latex

matrix:
include:
Expand All @@ -17,4 +19,13 @@ matrix:

script:
- chmod +x travis_build.sh
- docker run -v $TRAVIS_BUILD_DIR:/latex_templates lamtev/latex-build-tools /bin/bash -c " cd latex_templates && . ./travis_build.sh && build_latex_template $LATEX_TEMPLATE "
- docker run -v $TRAVIS_BUILD_DIR:/latex_templates lamtev/latex /bin/bash -c " cd latex_templates && . ./travis_build.sh && build_latex_template $LATEX_TEMPLATE "
- sudo chmod 777 ${TRAVIS_BUILD_DIR}/${LATEX_TEMPLATE}/${LATEX_TEMPLATE}.pdf

deploy:
provider: releases
api_key: "$GITHUB_DEPLOY_TOKEN"
file: ${TRAVIS_BUILD_DIR}/${LATEX_TEMPLATE}/${LATEX_TEMPLATE}.pdf
skip_cleanup: true
on:
tags: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Шаблоны для LaTeX'a
### Шаблоны для LaTeX'a [![Build Status](https://travis-ci.org/ejiek/latex_templates.svg?branch=master)](https://travis-ci.org/ejiek/latex_templates)
======
Здесь вы найдёте шаблоны [презентаций](https://github.com/ejiek/latex_templates/tree/master/presentation), [отчётов](https://github.com/ejiek/latex_templates/tree/master/report), а также выпускных работ ([бакалаврская](https://github.com/ejiek/latex_templates/tree/master/bachelor_thesis)).

Expand Down
16 changes: 11 additions & 5 deletions travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ build_latex_template()
cd $LATEX_TEMPLATE

pdflatex $LATEX_TEMPLATE.tex
if [ "$LATEX_TEMPLATE" == "bachelor_thesis" ] || [ "$LATEX_TEMPLATE" == "coursework" ]; then
bibtex $LATEX_TEMPLATE.aux
elif [ "$LATEX_TEMPLATE" == "bachelor_thesis" ]; then
makeindex $LATEX_TEMPLATE.nlo -s nomencl.ist -o $LATEX_TEMPLATE.nls
fi
case "$LATEX_TEMPLATE" in
"bachelor_thesis" )
bibtex $LATEX_TEMPLATE.aux
makeindex $LATEX_TEMPLATE.nlo -s nomencl.ist -o $LATEX_TEMPLATE.nls
;;

"coursework" )
bibtex $LATEX_TEMPLATE.aux
;;
esac

pdflatex $LATEX_TEMPLATE.tex
pdflatex $LATEX_TEMPLATE.tex

Expand Down

0 comments on commit c2c6fc0

Please sign in to comment.