Bug fix release fix (#271) #725
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 SS3 user manual using texlive | |
on: | |
workflow_dispatch: | |
push: | |
# paths: | |
# - '**.tex' | |
# - '**.yml' | |
pull_request: | |
paths: | |
- '**.tex' | |
- '**.yml' | |
workflow_call: | |
inputs: | |
ref: | |
default: ${{ github.ref }} | |
required: false | |
type: string | |
jobs: | |
build-pdf: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: remove rendered file, check that is gone. | |
run: | | |
rm -rf SS330_User_Manual.pdf | |
ls | |
- name: Spellcheck LaTeX document | |
uses: ChiefGokhlayeh/textidote-action@v5 | |
id: spellcheck | |
with: | |
root_file: SS330_User_Manual.tex | |
args: --check en --dict dictionary.txt --ignore sh:nobreak,sh:stacked,sh:nsubdiv,sh:seclen,sh:nonp,sh:hctab,sh:figref,lt:en:FILE_EXTENSIONS_CASE,lt:en:UNIT_SPACE,lt:en:STEPS_TO_DO,lt:en:UPPERCASE_SENTENCE_START,lt:en:COMMA_COMPOUND_SENTENCE_2,lt:en:COMMA_COMPOUND_SENTENCE,lt:en:ENGLISH_WORD_REPEAT_BEGINNING_RULE,lt:en:ENGLISH_WORD_REPEAT_RULE,lt:en:ENTER_IN,lt:en:CD_NN,lt:en:PHRASE_REPETITION,lt:en:SETUP_VERB,lt:en:ONES | |
- name: Print number of spellcheck warnings | |
run: 'echo "Number of spellcheck warnings: ${{ steps.spellcheck.outputs.num_warnings }}"' | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: SS330_User_Manual.tex | |
latexmk_use_lualatex: true | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SS330_User_Manual.pdf | |
path: SS330_User_Manual.pdf | |
- name: Upload log file when job fails | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SS330_User_Manual.log | |
path: SS330_User_Manual.log | |
- name: Upload TeXtidote report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: textidote_report | |
path: report.html | |
- name: Throw error if spellcheck warnings exist | |
# If the number of warnings goes up (in the previous step) and cannot be rectified, you can change | |
# the number below and increase the number of warnings that will trigger the action to fail | |
if: ${{ steps.spellcheck.outputs.num_warnings > 750 }} | |
run: 'echo "::error file=main.tex::num_warnings: ${{ steps.spellcheck.outputs.num_warnings }}"; exit 1;' |