Skip to content

GitHub action that compiles a PDF document from LaTeX source, uploading it to a release.

Notifications You must be signed in to change notification settings

TemplatesHub/gh-action-latex-build-and-release

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 

Repository files navigation

LaTeX build and release

LaTeX GitHub Actions
This actions compiles a PDF document starting from LaTeX source code and attaches the PDF document as asset in a release.

Table of contents

Usage example

This example is executed every time a new release is created, resulting in the compilation of PDF document, starting from the repository's LaTeX source code, which is then uploaded as asset in said release.

name: LaTeX document CD
on:
  release:
    types: [created]
jobs:
  build-and-release:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v2
      - name: Build and release LaTeX document
        uses: TemplatesHub/gh-action-latex-build-and-release@v2
        with:
          tex-entry-point: 'main'
          pdf-name: 'My_pdf_document'

Optional inputs

All the inputs in this action are optional.

Input Type Default Description
tex-entry-point string main Entry point .tex file used to create the PDF (do not include the file extension)
pdf-name string ${{github.event.repository.name}} Final PDF file name (do not include the file extension)
gh-token string ${{github.token}} Token used to upload the PDF to the release

Final PDF result

After the action has completed its execution successfully, you will find the PDF as asset in your latest release. The file name will be:

<pdf-name>-<latest tag>.pdf

Example (using tag v1.0.0 in the release): "My_pdf_document-v1.0.0.pdf"

Please note that, unfortunately, the white spaces in the PDF file name will be replaced with dots automatically by GitHub.