diff --git a/.travis.yml b/.travis.yml index 49f765e..c8ad342 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,16 @@ before_install: -- sudo apt-get update +- sudo apt-get update - sudo apt-get install texlive-latex-extra script: - mkdir _build - pdflatex -output-directory _build ./src/main.tex deploy: provider: releases + api_key: + secure: GK0T9i6YKZlKmxurW4B8lkBGCfUcehODrWA8VcuUaK4CgSYaVj2BzMJj4E7pA3Ucm76bGR9l1yWYA+RHRwg0033A8Tw54hIinAcwiuXCpRwgcVkbbxK77o8Q4g0ooRPAMePtkQrjeq1JgHN2sZUZ2CixhtCDApM8H4yaQW7bb7TmBFut/9YEfiJVBCAE0ZNjbjXSbYADRc9Zh1fy/53xJzgKC57dQnFDrnEsGlwRkrv5lQK+3Dw7ktd48pQe8C3c2LNZn052gaR0TxxzDBAyvG4nmeA17wYMvZk7UhfKYVdqUjNqwyjktvWQQDOAtWL7OrlBNfWyf5bEn1RsfsnZ7lX/3uTj1z2fQeaYcx29goSo6y7cemz+UFsuoG3ggMuD1V81xkLI82WglYnbDEd7wij5kj1+/YAliiiZtO98kLUXbyPKWq0ycmPjj1PKyiX1Gk4LMtPfvDEIdhm/uShCY+6PrOxnGPAEd+gKgA8kAdhkuZ1/IZjkbz0dQpoZgJse7V71x+cop8fvHsuFUcj/irk4qzfVkfhnKuNpMtq2z6HDvQ/GDkZKUTkNaok8rWGFGhE8TiXCoaEoWUASEQcqouQY8KHjqQT6JVgKLwsoPuA34Pb5Fb6tbFzrNT5QE7GTeoVa9GPXJ3IrKepdcRAo3I8GVEyH0rWItdWBH0tU7fo= file: - ./_build/main.pdf skip_cleanup: true on: tags: true - branch: master \ No newline at end of file + branch: master diff --git a/README.md b/README.md index f30cb32..3cb841f 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,23 @@ Write LaTeX, push to git, integrate with Travis, release a pdf. * Go to [Travis CI](https://travis-ci.org) and enable the repository. * Copy the `.travis.yml` file and specify the right tex file there, as well as the pdf that you want to have. +* Commit and push to check that the file builds. -Also see original [blog post](https://harshjv.github.io/blog/document-building-versioning-with-tex-document-git-continuous-integration-dropbox/). \ No newline at end of file +## To automatically deploy pdfs to GitHub release +* We will generate a GitHub OAuth key so Travis can push to your releases, with the important difference (compared to just gettting it via GitHub settings) that it's encryped so you can push it safely. +* (Windows) [Download ruby](https://rubyinstaller.org/downloads/) and at at end of the installation make sure to install MSYS including development kit. +* Run `gem install travis --no-rdoc --no-ri` to install the Travis Command-line Tool. +* Remove the `deploy` section in the `.travis.yml` or use `--force` in the next command. +* Replace everything below your encryped api key with +``` + file: + - ./_build/nameofmytexfile.pdf + skip_cleanup: true + on: + tags: true + branch: master +``` +* If you are ready to release, just tag and push. + +Adapted from [harshjv's blog](https://harshjv.github.io/blog/setup-latex-pdf-build-using-travis-ci/), and thanks to [jackolney](https://github.com/jackolney/travis-ci-latex-pdf) for all his attempts to put it into practice. +Also see harshjv's original [blog post](https://harshjv.github.io/blog/document-building-versioning-with-tex-document-git-continuous-integration-dropbox/). \ No newline at end of file