From f53558973521b0d45552f84ab88acfe0ca9144a6 Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Mon, 4 Oct 2021 19:25:06 +0100 Subject: [PATCH 1/2] CI: Add automatic compilation of booklet --- .github/workflows/compile.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..b0ece7f --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,39 @@ +name: LaTeX build + +on: + push: + tags: + - "*" + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: texlive/texlive:latest + steps: + - name: Install prerequisites + run: apt-get update && apt-get install -y ghostscript + - name: Checkout repository + uses: actions/checkout@v2 + - name: Compile the document + run: | + latex main.tex + dvips main.dvi + sh ./ps2book.sh main.ps + ps2pdf main_book.ps sangbog.pdf + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: Sangbog + path: sangbog.pdf + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: sangbog.pdf From 8c5fd82510999b330f3347719eeeda66b4dd8e04 Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Mon, 4 Oct 2021 23:31:44 +0100 Subject: [PATCH 2/2] CI: Run makeindex to include index page in compiled booklet --- .github/workflows/compile.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b0ece7f..1bf143b 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -23,6 +23,8 @@ jobs: uses: actions/checkout@v2 - name: Compile the document run: | + latex main.tex + makeindex main latex main.tex dvips main.dvi sh ./ps2book.sh main.ps