From 31d117d3ab4e21f448567528997a886a048d42af Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 17 Nov 2021 20:38:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Create=20thesis=20build=20workfl?= =?UTF-8?q?ow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-sphinx-thesis.yml | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-sphinx-thesis.yml diff --git a/.github/workflows/build-sphinx-thesis.yml b/.github/workflows/build-sphinx-thesis.yml new file mode 100644 index 0000000..c307019 --- /dev/null +++ b/.github/workflows/build-sphinx-thesis.yml @@ -0,0 +1,42 @@ +name: Build thesis document +on: + push: + branches: [ main ] + paths: + - "thesis/**" +jobs: + html: + name: "Build HTML document" + runs-on: ubuntu-latest + steps: + - name: "Checkout repository" + uses: actions/checkout@v2 + - name: "Build HTML document with Sphinx" + uses: ammaraskar/sphinx-action@master + with: + docs-folder: "thesis/" + build-command: "make html" + - name: "Create a gzip of the build" + run: "tar -xvzf thesis/_build/thesis.html.tar.gz thesis/_build/html" + - name: "Upload build artifact" + uses: actions/upload-artifact@v2 + with: + name: "thesis.html.tar.gz" + path: "thesis/_build/thesis.html.tar.gz" + latexpdf: + name: "Build PDF document" + runs-on: ubuntu-latest + steps: + - name: "Checkout repository" + uses: actions/checkout@v2 + - name: "Build Latex document with Sphinx" + uses: ammaraskar/sphinx-action@master + with: + docs-folder: "thesis/" + pre-build-command: "apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended" + build-command: "make latexpdf" + - name: "Upload build artifact" + uses: actions/upload-artifact@v2 + with: + name: "thesis.pdf" + path: "thesis/_build/latex/sophon.pdf"