I have a repository that has a LaTex file inside a folder. The folder is named Literature Review and the file is named Review.tex. I'm new to docker and GitHub Actions. I have tried a lot of different combinations to set the file path:
Literature Review/Review.tex
I have tried a lot of methods suggested on StackOverflow but it seems I'm too naive to understand the implementation correctly xD
I read somewhere that to avoid an escape sequence, we can use a \ before the space. This, however, did not make much difference.
The workflow returns the following error while building:
Run echo ${MANUSCRIPT_PATH}.tex
echo ${MANUSCRIPT_PATH}.tex
${LATEX} ${MANUSCRIPT_PATH}.tex
${BIBTEX} ${MANUSCRIPT_PATH}.aux
${LATEX} ${MANUSCRIPT_PATH}.tex
${LATEX} ${MANUSCRIPT_PATH}.tex
shell: /bin/bash -e {0}
env:
MANUSCRIPT_PATH: Literature\ Review/Review
LATEX: pdflatex -shell-escape
BIBTEX: bibtex
Literature\ Review/Review.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
! I can't find file `Literature'.
<to be read again>
\
<*> Literature\
Review/Review.tex
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\
<*> Literature\
Review/Review.tex
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on texput.log.
Error: Process completed with exit code 1.
My yml file looks like this:
name: paper-maker
on: push
jobs:
build:
runs-on: ubuntu-latest
env:
# This needs fixing
MANUSCRIPT_PATH: 'Literature\ Review/Review' # exclude the '.tex' / '.pdf' extension!
LATEX: pdflatex -shell-escape
BIBTEX: bibtex
steps:
- uses: actions/checkout@v1
- name: Install texlive
run: |
sudo apt-get install texlive-publishers \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra
- name: Build paper
run: |
echo ${MANUSCRIPT_PATH}.tex
${LATEX} ${MANUSCRIPT_PATH}.tex
${BIBTEX} ${MANUSCRIPT_PATH}.aux
${LATEX} ${MANUSCRIPT_PATH}.tex
${LATEX} ${MANUSCRIPT_PATH}.tex
- name: Push paper
run: |
git checkout --orphan ${GITHUB_REF##*/}-pdf
git rm -rf .github/
git rm -rf .
git add -f ${MANUSCRIPT_PATH##*/}.pdf
git -c user.name='paper-maker' -c user.email='paper-maker' commit -m "update pdf"
git push -q -f https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ${GITHUB_REF##*/}-pdf