Skip to content

Instantly share code, notes, and snippets.

@beevelop
Last active June 1, 2017 06:53
Show Gist options
  • Save beevelop/a6739d747a037f4c1aa9fb8e70eccd38 to your computer and use it in GitHub Desktop.
Save beevelop/a6739d747a037f4c1aa9fb8e70eccd38 to your computer and use it in GitHub Desktop.
Continuous Integration / Deployment / Delivery for LaTeX documents
{
"non-interactive": true,
"force": false,
"pkgFiles": [
"package.json"
],
"increment": "patch",
"commitMessage": "Release v%s",
"tagName": "v%s",
"tagAnnotation": "Release v%s",
"changelogCommand": "git log --pretty=format:'* %s (%h)' [REV_RANGE]",
"requireCleanWorkingDir": true,
"npm": {
"publish": false
},
"github": {
"release": true
}
}
sudo: required
language: node_js
services:
- docker
script:
- docker pull beevelop/latex
- cd tex
- docker run --rm -e ENABLE_BIBER=true -e ENABLE_GLOSSARIES=true -e ENABLE_CLEANUP=true -v `pwd`:/mnt/src beevelop/latex main
- ls -lah
- cd ..
deploy:
- provider: releases
api_key: "github-api-key"
file: "tex/main.pdf"
skip_cleanup: true
on:
tags: true

Continuous Everything for LaTeX documents

Uses the beevelop/latex Docker image and Travis to automatically attach PDF files to GitHub Releases.

Release Management

To enable awesome Changelogs use the npm package release-it

npm i -g release-it

release-it # does a patch release (v1.0.X)
release-it minor # v1.X.0
release-it major # vX.0.0

Preview (on macOS)

Use preview.sh to build and view the PDF file locally (macOS, Preview.app). Docker is required on the respective system in order to run the builds.

#!/bin/bash
docker build -t latex .
docker run --rm -e ENABLE_BIBER=true -e ENABLE_GLOSSARIES=true -e ENABLE_CLEANUP=true -v `pwd`/tex:/mnt/src beevelop/latex main && \
open -a /Applications/Preview.app tex/main.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment