Skip to content

enforce non-breakable space #58

enforce non-breakable space

enforce non-breakable space #58

Workflow file for this run

name: Build LaTeX document
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build_latex:
runs-on: ubuntu-latest
env:
PAPER: ${{ github.event.repository.name }}
steps:
- name: Set up Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compile LaTeX document
id: compileLaTeXdocument
uses: xu-cheng/latex-action@v3
with:
root_file: |
${{ env.PAPER }}.tex
working_directory: paper
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace
env:
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
continue-on-error: true
- name: Upload PDF
if: steps.compileLaTeXdocument.outcome == 'success' && github.event_name != 'push'
uses: actions/upload-artifact@v3
with:
name: Success--Here-is-the-PDF
path: |
paper/${{ env.PAPER }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdocument.outcome == 'failure' && github.event_name != 'push'
uses: actions/upload-artifact@v3
with:
name: Build-Failed--Here-are-the-Logs
path: |
paper/**/*.log
- name: Fail job if build failed
if: steps.compileLaTeXdocument.outcome == 'failure'
run: exit 1
- name: Create release
if: github.event_name == 'push'
uses: rymndhng/release-on-push-action@master
id: release
with:
# add a label to your pull request to change the default behavior:
# release:major
# release:minor
# release:patch
# norelease
bump_version_scheme: patch
tag_prefix: v
release_body: ""
use_github_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload PDF to release
if: github.event_name == 'push'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: paper/${{ env.PAPER }}.pdf
asset_name: ${{ env.PAPER }}.pdf
tag: ${{ steps.release.outputs.tag_name }}
overwrite: true
body: ""