diff --git a/.github/workflows/build-sphinx-report.yml b/.github/workflows/build-sphinx-report.yml index b7258f6..202fb6f 100644 --- a/.github/workflows/build-sphinx-report.yml +++ b/.github/workflows/build-sphinx-report.yml @@ -29,7 +29,9 @@ jobs: run: echo "pythonLocation=$(poetry env list --full-path | cut -f1 -d' ')/bin" >> $GITHUB_ENV - name: "Build HTML document with Sphinx" working-directory: report/ - run: make html + run: | + source $pythonLocation/activate + make html - name: "Create a gzip of the build" run: "tar -xvzf report/_build/report.html.tar.gz report/_build/html" - name: "Upload build artifact" @@ -61,7 +63,9 @@ jobs: run: apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended - name: "Build Latex document with Sphinx" working-directory: report/ - run: make latexpdf + run: | + source $pythonLocation/activate + make latexpdf - name: "Upload build artifact" uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/build-sphinx-thesis.yml b/.github/workflows/build-sphinx-thesis.yml index ddfb785..91d27fb 100644 --- a/.github/workflows/build-sphinx-thesis.yml +++ b/.github/workflows/build-sphinx-thesis.yml @@ -29,7 +29,9 @@ jobs: run: echo "pythonLocation=$(poetry env list --full-path | cut -f1 -d' ')/bin" >> $GITHUB_ENV - name: "Build HTML document with Sphinx" working-directory: thesis/ - run: make html + run: | + source $pythonLocation/activate + 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" @@ -61,7 +63,9 @@ jobs: run: apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended - name: "Build Latex document with Sphinx" working-directory: thesis/ - run: make latexpdf + run: | + source $pythonLocation/activate + make latexpdf - name: "Upload build artifact" uses: actions/upload-artifact@v2 with: diff --git a/thesis/Makefile b/thesis/Makefile index b343f0b..86bf5be 100644 --- a/thesis/Makefile +++ b/thesis/Makefile @@ -1,23 +1,18 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= "sphinx-build" -SOURCEDIR = "source" -BUILDDIR = "build" +export SPHINXOPTS = +export SPHINXBUILD = "sphinx-build" +export SOURCEDIR = "source" +export BUILDDIR = "build" export LATEXMKOPTS ?= "" export LATEXOPTS ?= "-interaction=nonstopmode" # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) livehtml: - sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) .PHONY: help Makefile @@ -25,4 +20,4 @@ livehtml: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)