Fix LaTeX build config. (#349) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build LaTeX documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'doc/latex/**' | |
workflow_dispatch: | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: masterdoc.tex | |
working_directory: doc/latex | |
- name: Move pdf and remove other files | |
run: | | |
mv doc/latex/masterdoc.pdf . | |
ls | grep -xv "masterdoc.pdf" | xargs rm -rf | |
- name: Commit documentation | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Build documentation | |
branch: gh-doc | |
file_pattern: masterdoc.pdf | |
create_branch: true | |
push_options: '--force' |